public static <E> Stream<E> stream(final Collection<E> collection) {
        if (collection == null || collection.isEmpty()) {
            return Stream.empty();
        } else {
            return collection.stream();
        }
    }
Returns a {@link Stream<E>} if collection is non-null else returns an empty {@link Stream<E>}
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java