Add functions to get the type of the event