presto-mongodb/src/main/java/io/prestosql/plugin/mongodb/MongoSession.java/MongoSession/translateValue
class MongoSession:    private static Object translateValue(Object source, Type type)
    {
        if (source instanceof Slice) {
            if (type instanceof ObjectIdType) {
                return new ObjectId(((Slice) source).getBytes());
            }
            else {
                return ((Slice) source).toStringUtf8();
            }
        }

        return source;
    }