public static <T1, R> R requireNonNull(final T1 value,
                                           final Function<T1, R> getter,
                                           final Supplier<String> messageSupplier) {
        if (value == null) {
            throw new NullPointerException(buildNullValueMsg("value", messageSupplier));
        } else {
            R result = Objects.requireNonNull(getter, "Null getter")
                    .apply(value);
            if (result == null) {
                throw new NullPointerException(buildNullGetterResultMsg(0, messageSupplier));
            } else {
                return result;
            }
        }
    }
Require that both {@code value} is non-null and the result of applying {@code getter} to
{@code value} is non-null. Throws an {@link NullPointerException} otherwise.

@throws NullPointerException
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java