Checks if the type is either bool, String, int, num, double, or dynamic
type
dynamic
bool isPrimitiveType(Type type) => type == bool || type == String || type == int || type == num || type == double || type == dynamic;