public static String trim(final String str) {
        return str != null
                ? str.trim()
                : "";
    }
@return str trimmed or an empty string if str is null
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java