public static <T1, T2, T3> void consume(final T1 value,
                                            final Function<T1, T2> getter1,
                                            final Function<T2, T3> getter2,
                                            final Consumer<T3> consumer) {
        if (value != null && consumer != null) {
            final T2 value2 = Objects.requireNonNull(getter1).apply(value);
            if (value2 != null) {
                final T3 value3 = Objects.requireNonNull(getter2).apply(value2);
                if (value3 != null) {
                    consumer.accept(value3);
                }
            }
        }
    }
If value is non-null apply getter1 to it.
If the result of that is non-null apply getter2 to the result.
If the result of that is non-null consume the result.
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java