added some argument checks
Merge pull request #3 from sci4me/events

added some argument checks