code: def check_filename(filename):
      
      if not isinstance(filename, str):
          raise TypeError("filename must be a string")
      if regex.path.linux.filename.search(filename):
          return True
      return False
docs: Returns a boolean stating if the filename is safe to use or not. Note that
      this does not test for "legal" names accepted, but a more restricted set of:
      Letters, numbers, spaces, hyphens, underscores and periods.
  
      :param filename: name of a file as a string
      :return: boolean if it is a safe file name