Add some validation logic to the Kodi API; catch errors before messages are sent