code: 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 Truf 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
docs: Verifies that the preview is a valid filetype