While developing I wrote a method like this:
public void Test<T>(T data)
if (!typeof(T).IsValueType && data == null)
// stuff here
Very simplified of course but this piece of code still gets R# to generate a "Possible compare of value type with null" at the "== null" part.
Why is that? Obviously "data" will no longer be a ValueType is it passes the "!typeof(T).IsValueType" part.