make error argument optional

so `ee.emit('error')` doesn't throw when domains are active