Menu: Ensure an event was passed before checking its type. Fixes #9384 - Menu: _focus function forgets null check with doing a pattern match on event.type