Returns true if type is primitive (String, int, double, num or bool).
true
type
static bool isPrimitiveType<T>([Type? type]) { type ??= T; return TypeInfo.from(type).isPrimitiveType; }