code: private void validate(WorkflowDef def) {
          Preconditions.checkNotNull(def, "WorkflowDef object cannot be null");
          Preconditions.checkNotNull(def.getName(), "WorkflowDef name cannot be null");
      }
docs: Use {@link Preconditions} to check for required {@link WorkflowDef} fields, throwing a Runtime exception if
  validations fail.
  
  @param def The {@code WorkflowDef} to check.