`menuItems[tag]` could fail, so you should use `menuItems.find(tag)` similar to isMenuItemEnabled().