public static boolean isEmpty(CharSequence cs){
  return cs == null || cs.length() == 0;
}

public static boolean isEmpty ( CharSequence cs ) { return cs == null || cs . length ( ) == 0 ; }
checks if a charsequence is empty ( " " ) or null .
