public static <T1, T2 extends Map<K, V>, K, V> boolean hasEntries(
            final T1 value,
            final Function<T1, T2> mapGetter) {

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