Serialise null to null in JSON

Serialising to `[]` is silly. JSON has a null type.