public static boolean isEmpty(@Nullable String str){
  return str == null || str.isEmpty();
}

public static boolean isEmpty ( @ Nullable String str ) { return str == null || str . isEmpty ( ) ; }
performs a null - safe check for a null or empty string .
