code: def check_is_a_string(var, allow_none=False):
      
      if not is_a_string(var, allow_none=allow_none):
          raise TypeError("var must be a string, however type(var) is {}"
                          .format(type(var)))
docs: Calls is_a_string and raises a type error if the check fails.