Sets or replaces the menu item’s submenu, or removes it when a null submenu is passed.
a MenuItem
the submenu, or null