Added more validation for event data