public static <T> void consumeOr(final T value,
                                     final Consumer<T> consumer,
                                     final Runnable runnable) {
        if (value != null) {
            if (consumer != null) {
                consumer.accept(value);
            }
        } else {
            if (runnable != null) {
                runnable.run();
            }
        }
    }
If value is non-null pass it to the consumer, else execute runnable.
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java