public static Optional<Comparator<Val>> getSortComparator(final Type valType) {
        return NullSafe.getAsOptional(
                valType,
                SORT_COMPARATORS_BY_TYPE_MAP::get);
    }
@return True if val is not null and is not {@link ValNull#INSTANCE}
stroom-query/stroom-query-language/src/main/java/stroom/query/language/functions/ValComparators.java