check for _event_handlers attribute before accessing