if ( s == null ) echo ( "was null" ); else if ( s.length() == 0 ) echo ( "was empty" ); else if ( s.trim().length () == 0 ) echo ( "was blank or other whitespace" );