public static void requireNonNullNorEmpty(String s){
  if (s == null) {
    throw new NullPointerException();
  }
  if (s.isEmpty()) {
    throw new IllegalArgumentException();
  }
}

public static void requireNonNullNorEmpty ( String s ) { if ( s == null ) { throw new NullPointerException ( ) ; } if ( s . isEmpty ( ) ) { throw new IllegalArgumentException ( ) ; } }
checks whether provided string is null or empty .
