You can use Nullable.GetUnderlyingType(Type) - which will return null if it is not a type with a zero value to start with or enter a base value differently:
if (Nullable.GetUnderlyingType(t) != null) {
Note that this uses the static Nullable class, not the Nullable<T> structure.
source share