added checks and logging for event type validation.