public static <T> T first(final List<T> list) {
        if (list == null || list.isEmpty()) {
            return null;
        } else {
            // GWT can't do getFirst()
            return list.get(0);
        }
    }
@return The first item in the list or null if list is null or empty.
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java