presto-tpch/src/main/java/io/prestosql/plugin/tpch/util/Types.java/Types/checkType
class Types:    public static <T> T checkType(Object object, Class<T> expectedClass, String messageTemplate, Object... arguments)
    {
        checkArgument(expectedClass.isInstance(object), messageTemplate, arguments);
        return expectedClass.cast(object);
    }