Ok, so what we could do is mark that API as deprecated and document that it accepts nulls (which it does).

We should then introduce a new method:

    def encode(data: Map[String, Option[String]]): String = {

The deprecated method can call this and pass in a transformed map like so:

    encode(data.map((k, v) => (k -> Option(v))))

Thoughts?