undefined is not a valid value

We only allow values that can be encoded as JSON, and undefined can't be
encoded as JSON.