public static String defaultIfBlank(final String str, final String defaultStr) {
        return isBlank(str) ? defaultStr : str;
    }
Returns either the passed in String, or if the String is
whitespace, empty ("") or {@code null}, the value of {@code defaultStr}.

<p>Whitespace is defined by {@link Character#isWhitespace(char)}.</p>

<pre>
LangUtils.defaultIfBlank(null, "NULL")  = "NULL"
LangUtils.defaultIfBlank("", "NULL")    = "NULL"
LangUtils.defaultIfBlank(" ", "NULL")   = "NULL"
LangUtils.defaultIfBlank("bat", "NULL") = "bat"
LangUtils.defaultIfBlank("", null)      = null
</pre>
@param str the String to check, may be null
@param defaultStr  the default String to return
 if the input is whitespace, empty ("") or {@code null}, may be null
@return the passed in String, or the default
primefaces/src/main/java/org/primefaces/util/LangUtils.java