You can use the typeof operator with generic types, so typeof(T) will get the Type reference corresponding to T, and then use the IsValueType property:
if (typeof(T).IsValueType)
Or if you want to include nullable value types as if they were reference types:
// Only true if T is a reference type or nullable value type
if (default(T) == null)