changing typeof === 'object' check to typeof event.namespace/event.type
=== 'string' for implicit duck-typing