public static bool TypeAllowsNull(Type type) { return Nullable.GetUnderlyingType(type) != null || !type.IsValueType; }