Make json_event more paranoid about tags

This makes the error more clear when you feed something insane
(like a hash, for example) to it.