Object decode(BsonValue bson) {
      final Object value;
      if (isNullable && bson.isNull()) {
        // return NULL if field is nullable and BSON is null
        value = null;
      } else if (!bson.isDocument()) {
        value = decoder.decode(new BsonValueReader(bson), DecoderContext.builder().build());
      } else {
        value = decoder.decode(new BsonDocumentReader(bson.asDocument()), DecoderContext.builder().build());
      }
      return value;
    }
Provider for {@link ProjectedTuple}. Used when there are projections.
criteria/mongo/src/org/immutables/criteria/mongo/TupleCodecProvider.java