public static <T1, R> boolean test(final T1 value,
                                       final Function<T1, R> getter,
                                       final Predicate<R> predicate) {
        if (value == null) {
            return false;
        } else {
            final R result = Objects.requireNonNull(getter)
                    .apply(value);
            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>
   boolean hasValues = NullSafe.test(myObject, MyObject::getItems, list -> !list.isEmpty());
</code></pre>

@return false if value is null or the getter returns 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