code: def chkstr(s, v):
      
      if type(s) != str:
          raise TypeError("{var} must be str".format(var=v))
      if not s:
          raise ValueError("{var} cannot be empty".format(var=v))
docs: Small routine for checking whether a string is empty
      even a string
  
      :param s: the string in question
      :param v: variable name