presto-main/src/main/java/io/prestosql/sql/planner/LiteralEncoder.java/LiteralEncoder/canEncode
class LiteralEncoder:    public static boolean canEncode(Object object, Type type)
    {
        if (object instanceof Expression) {
            return true;
        }

        if (object == null) {
            return true;
        }
        return SUPPORTED_PRIMITIVE_TYPES.contains(Primitives.unwrap(type.getJavaType()));
    }