Added a check to see if the method exists when looping the
eventlisteners.
Merge pull request #9 from sumocoders/improved-error-handling

Added a check to see if the method exists when looping the