Adds check for JSON input on websocket server.