code: def _is_null_value(self, value):
          
          if value is None:
              return True
  
          if IS_PY3:
              # Python 3.X
              if isinstance(value, str) and len(value) == 0:
                  return True
          else:
              # Python 2.X
              if isinstance(value, basestring) and len(value) == 0:  # NOQA: F821
                  return True
  
          # TODO: This should probably be removed when solved in core Solr level?
          return False
docs: Check if a given value is ``null``.
  
          Criteria for this is based on values that shouldn't be included
          in the Solr ``add`` request at all.