static boolean haveTypes(final Object val1,
                             final Object val2,
                             final Class<?> typeA,
                             final Class<?> typeB) {
        return (typeA.isInstance(val1) && typeB.isInstance(val2))
               || (typeB.isInstance(val1) && typeA.isInstance(val2));
    }
This is to deal with the

@param val1
@param val2
@return
stroom-query/stroom-query-language/src/main/java/stroom/query/language/functions/ValComparators.java