Returns true if the base type (nullable-stripped) is a primitive.
bool isPrimitive(String type) => primitives.contains(baseType(type));