public static bool IsPrimitive(this Type type) { return type == typeof (string) || type.IsValueType || type.IsPrimitive; } }