code: def find_type(cls, val):
          
          mt = ""
          index = val.rfind(".")
          if index == -1:
              val = "fake.{}".format(val)
          elif index == 0:
              val = "fake{}".format(val)
  
          mt = mimetypes.guess_type(val)[0]
          if mt is None:
              mt = ""
  
          return mt
docs: return the mimetype from the given string value
  
          if value is a path, then the extension will be found, if val is an extension then
          that will be used to find the mimetype