Verifies that the preview is a valid filetype

def is_valid_preview(preview):
  ''' Verifies that the preview is a valid filetype '''
  if not preview:
    return False

  if mimetype(preview) not in [ExportMimeType.PNG, ExportMimeType.PDF]:
    return False

  return True