Ensures that the message parser returns a default "{}" response after handling an event, preventing unintended empty responses.
Also, this change avoids sending empty messages to the client unnecessarily.
Implements a check to ensure a simulator is active before processing commands.
This prevents errors and unexpected behavior when commands are sent without an active simulator. The check is performed at the beginning of the command parsing, and logs an error if no simulator is active, returning an empty JSON object.