public static boolean isEmptyOrWhitespace(String s){
  s=makeSafe(s);
  for (int i=0, n=s.length(); i < n; i++) {
    if (!Character.isWhitespace(s.charAt(i))) {
      return false;
    }
  }
  return true;
}

public static boolean isEmptyOrWhitespace ( String s ) { s = makeSafe ( s ) ; for ( int i = 0 , n = s . length ( ) ; i < n ; i ++ ) { if ( ! Character . isWhitespace ( s . charAt ( i ) ) ) { return false ; } } return true ; }
helper function for null , empty , and whitespace string testing .
