public static boolean hasLength(CharSequence str) {
        return (str != null && str.length() > 0);
    }
Check that the given CharSequence is neither {@code null} nor of length 0.

@param str the CharSequence to check (may be {@code null})
@return {@code true} if the CharSequence is not null and has length
src/main/java/spark/utils/StringUtils.java