code: private static void checkPreconditions(final String regex, final String replacement) {
  		if( regex == null ) {
  			throw new NullPointerException("regex should not be null");
  		} else if( regex.length() == 0 ) {
  			throw new IllegalArgumentException("regex should not be empty");
  		}
  		
  		if( replacement == null ) {
  			throw new NullPointerException("replacement should not be null");
  		}
  	}
docs: Checks the preconditions for creating a new StrRegExReplace processor.
  
  @param regex
  the supplied regular expression
  @param replacement
  the supplied replacement text
  @throws IllegalArgumentException
  if regex is empty
  @throws NullPointerException
  if regex or replacement is null