public static <T> void consume(final T value,
                                   final Consumer<T> consumer) {
        if (value != null && consumer != null) {
            consumer.accept(value);
        }
    }
If value is non-null pass it to the consumer, else it is a no-op.
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java