code: def validate_type(value, types, **kwargs):
      
      if not is_value_of_any_type(value, types):
          raise ValidationError(MESSAGES['type']['invalid'].format(
              repr(value), get_type_for_value(value), types,
          ))
docs: Validate that the value is one of the provided primative types.