Added stronger validation to event manager.