docs: public static boolean isValidType(FileUpload fileUpload, String fileName, InputStream inputStream) {
          try {
              boolean validType = isValidFileName(fileUpload, fileName) && isValidFileContent(fileUpload, fileName, inputStream);
              if (validType) {
                  if (LOGGER.isLoggable(Level.FINE)) {
                      LOGGER.fine(String.format("The uploaded file %s meets the filename and content type specifications", fileName));
                  }
              }
              return validType;
          }
          catch (IOException | ScriptException ex) {
              if (LOGGER.isLoggable(Level.WARNING)) {
                  LOGGER.log(Level.WARNING, String.format("The type of the uploaded file %s could not be validated", fileName), ex);
              }
              return false;
          }
      }