code: public boolean isValidMimeType(String mimeType) {
          if (mimeType == null) {
              return false;
          } else if (mimeType.indexOf(";") != -1) {
              return mimetypes.contains(mimeType.split(";")[0]);
          } else {
              return mimetypes.contains(mimeType);
          }
      }
docs: check the mimetype is referenced in the mimetypes database
  
  @param mimeType
  the mimeType to verify