Prevents submission of empty messages to chat.