Event dispatcher does not depend on logger anymore, added NULL checks in
order to have the ability to leave out the logger.