Fixed crashing when ext doesn't exist in message

When a user tries to use curl or some other method to post a message to the faye and doesn't have 'ext' in the data the server crashes.
This patch fixes this issue by checking the existence first