<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

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