public static boolean isEmpty(final String str, final boolean trim) {
	if (!trim) return isEmpty(str);
	return str == null || str.trim().length() == 0;
    }
public static boolean isEmpty ( final String str , final boolean trim ) { if ( ! trim ) return isEmpty ( str ) ; return str == null || str . trim ( ) . length ( ) == 0 ; }
check if string is empty (null or "")

@param str
@return is empty or not