Add validation of incoming messages.