code: private static void checkNamedOutputName(JobContext job, String namedOutput, boolean alreadyDefined) {
  		validateOutputName(namedOutput);
  		List<String> definedChannels = getNamedOutputsList(job);
  		if(alreadyDefined && definedChannels.contains(namedOutput)) {
  			throw new IllegalArgumentException("Named output '" + namedOutput + "' already alreadyDefined");
  		} else if(!alreadyDefined && !definedChannels.contains(namedOutput)) {
  			throw new IllegalArgumentException("Named output '" + namedOutput + "' not defined");
  		}
  	}
docs: Checks if a named output name is valid.
  
  @param namedOutput
  named output Name
  @throws IllegalArgumentException
  if the output name is not valid.