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

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