public static <T1, T2, R> boolean test(final T1 value,
                                           final Function<T1, T2> getter1,
                                           final Function<T2, R> getter2,
                                           final Predicate<R> predicate) {
        if (value == null) {
            return false;
        } else {
            final T2 value2 = Objects.requireNonNull(getter1)
                    .apply(value);
            if (value2 == null) {
                return false;
            } else {
                final R result = Objects.requireNonNull(getter2).apply(value2);
                return result != null
                       && Objects.requireNonNull(predicate)
                               .test(result);
            }
        }
    }
Allows you to test some property of a value without worrying if the value is null, e.g.
<pre><code>
   List<Sting> list = null;
   boolean hasValues = NullSafe.test(list, list -> list.size > 0);
</code></pre>

@return false if value is null, else return the value of the predicate when applied
to the result of the getter.
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java