Indeed, I missed that case, but we can always replace it with `submenus = getattr(item, "getContextMenus", lambda event: [])(event) or []` or something similar.  It may be better to require `getContextMenu` to return an iterable rather than `None`, by the way, but this is an orthogonal issue.