Assert $eventArgs class type before use.

Attempt to fix issue #7