Adding a check for EVENT_ANY callback