public static <T> boolean allNull(final T... vals) {
        if (vals == null) {
            return true;
        } else {
            boolean allNull = true;
            for (final T val : vals) {
                if (val != null) {
                    allNull = false;
                    break;
                }
            }
            return allNull;
        }
    }
@return True if all values in the array are null or the array itself is null
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java