private static BsonDocument fromValue(BsonValue value) {
      return value.isDocument() ? value.asDocument() : new BsonDocument("value", value);
    }
Simulates {@link BsonReader} but for a simple (scalar) {@link BsonValue} not {@link BsonDocument}
criteria/mongo/src/org/immutables/criteria/mongo/TupleCodecProvider.java