Avoid crash if menu item is nil.