protection against malformed json

We discover today that a malformed json inserted directly into RabbitMQ could crash the sensu-server. This little check prevent it to crash.