How to handle possible null values in CSFLE automatic encryption

We also tried bsonType: ["string", "null"] and anyOf, same as you, none of it worked, Mongo throws schema errors. So for now, either skip the field if it’s null, or use empty strings as a workaround. Really hoping Mongo adds proper support for this down the line.