public static <T> boolean isTrue(final T val, final Function<T, Boolean> getter) {
        if (val == null) {
            return false;
        } else {
            Objects.requireNonNull(getter);
            final Boolean bool = getter.apply(val);
            return bool != null && bool;
        }
    }
@return True if val is not null and the result of applying getter to value
is non-null and true
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java