code: private void validateWorkflow(WorkflowDef workflowDef, Map<String, Object> workflowInput, String externalStoragePath) {
          try {
              //Check if the input to the workflow is not null
              if (workflowInput == null && StringUtils.isBlank(externalStoragePath)) {
                  LOGGER.error("The input for the workflow '{}' cannot be NULL", workflowDef.getName());
                  throw new ApplicationException(INVALID_INPUT, "NULL input passed when starting workflow");
              }
          } catch (Exception e) {
              Monitors.recordWorkflowStartError(workflowDef.getName(), WorkflowContext.get().getClientApp());
              throw e;
          }
      }
docs: Performs validations for starting a workflow
  
  @throws ApplicationException if the validation fails