code: def IsFile(v):
      
      try:
          if v:
              v = str(v)
              return os.path.isfile(v)
          else:
              raise FileInvalid('Not a file')
      except TypeError:
          raise FileInvalid('Not a file')
docs: Verify the file exists.
  
      >>> os.path.basename(IsFile()(__file__)).startswith('validators.py')
      True
      >>> with raises(FileInvalid, 'not a file'):
      ...   IsFile()("random_filename_goes_here.py")
      >>> with raises(FileInvalid, 'Not a file'):
      ...   IsFile()(None)