Handle null bodies

TODO: find out why two messages are being sent, the first with the
real message that is being ignored, and the second with a null body.