syncbot: Better detect if an event represents an error
syncbot: Better detect if an event represents an error

I'm not sure why, but there are some correct events whose `err`
property gets set to an empty object. These events don't represent any
error, but the logic that checks if something is an error just casts the
value to boolean, which means an empty object is evaluated to true, and
therefore syncbot things its an error, and will not sync it back
correctly.

Change-type: patch
Signed-off-by: Juan Cruz Viotti <b49a5780a99ea81284fc0746a78f84a30e4d5c73@balena.io>

resin-io-modules/resin-procbots,resin-io-modules/resin-procbots,resin-io-modules/resin-procbots