code: def exists(cls, **kwargs):
          
          if not kwargs:
              raise ValueError(u"`Exists` method requires at least one kwarg.")
  
          # special case to check for a simple pk
          if len(kwargs) == 1 and cls._field_is_pk(list(kwargs.keys())[0]):
              return cls.get_field('pk').exists(list(kwargs.values())[0])
  
          # get only the first element of the unsorted collection (the fastest)
          try:
              cls.collection(**kwargs).sort(by='nosort')[0]
          except IndexError:
              return False
          else:
              return True
docs: A model with the values defined by kwargs exists in db?
  
          `kwargs` are mandatory.