Added checks to server to prevent get requests and empty/null messages from causing issues