public static bool IsNullableType (Type type) { return type.IsGenericType && type.GetGenericTypeDefinition ().Equals (typeof (Nullable<>)); }