def type_class
      return String unless casted # This is rubbish, to handle validations
      return @type_class unless @type_class.nil?
      base = @type.is_a?(Array) ? @type.first : @type
      base = String if base.nil?
      base = TrueClass if base.is_a?(String) && base.downcase == 'boolean'
      @type_class = base.is_a?(Class) ? base : base.constantize
    end
def type_class
      return String unless casted # This is rubbish, to handle validations
      return @type_class unless @type_class.nil?
      base = @type.is_a?(Array) ? @type.first : @type
      base = String if base.nil?
      base = TrueClass if base.is_a?(String) && base.downcase == 'boolean'
      @type_class = base.is_a?(Class) ? base : base.constantize
    end
Always provide the basic type as a class. If the type
 is an array, the class will be extracted.