Prevent non-arrays from being passed to emitEvent

Fixes #65.