Added check for event type existence