public static <T> void doIfNull(final T input,
                                    final CheckedConsumer<T> trueFunction,
                                    final CheckedConsumer<T> falseFunction) {
        try {
            if (input == null) {
                trueFunction.accept(null);
            } else {
                falseFunction.accept(input);
            }
        } catch (final Throwable e) {
            LoggingUtils.warn(LOGGER, e);
        }
    }
Do if null.

@param <T>           the type parameter
@param input         the input
@param trueFunction  the true function
@param falseFunction the false function
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/function/FunctionUtils.java