"What we could do here is to create a ComplexValue leaf for the string (that is really not complex) and always use complexValueP to get to the attribute value."

Yes, that was my proposal... but I agree it can involve complication. So probably is better to solve the case end-to-end (including mongoBackend request processing, mongoBackend response generation, rendering, etc.) then, once we have it, try to optimize that part. If you agree, I will create an issue for that.