code: def is_primitive(value):
          
          typeCode = TypeConverter.to_type_code(value)
          return typeCode == TypeCode.String or typeCode == TypeCode.Enum or typeCode == TypeCode.Boolean \
                 or typeCode == TypeCode.Integer or typeCode == TypeCode.Long \
                 or typeCode == TypeCode.Float or typeCode == TypeCode.Double \
                 or typeCode == TypeCode.DateTime or typeCode == TypeCode.Duration
docs: Checks if value has primitive type.
  
          Primitive types are: numbers, strings, booleans, date and time.
          Complex (non-primitive types are): objects, maps and arrays
  
          :param value: a value to check
  
          :return: true if the value has primitive type and false if value type is complex.