I didn't think about that because it seems each case is a little different, and this introduces another level of call stack depth in performance sensitive code.

On the other hand, `trim()` keeps getting used in conditions, so maybe having some more semantic methods to use would reduce that.

Maybe `StringUtils.isWhitespace(str)` or `StringUtils.isWS(str)` ?