public static <T1, T2 extends Collection<E>, E> boolean hasItems(
            final T1 value,
            final Function<T1, T2> collectionGetter) {

        if (value == null) {
            return false;
        } else {
            final T2 collection = Objects.requireNonNull(collectionGetter)
                    .apply(value);
            return collection != null && !collection.isEmpty();
        }
    }
@return True if value is non-null and the collection is non-null and not empty
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java