         
         guard let menu = self.outlineMenu else { return false }
         
-        let nextRange = (menu.indexOfSelectedItem + 1)..<menu.numberOfItems
-        
-        return menu.itemArray[nextRange].contains { $0.representedObject != nil }
+        return menu.itemArray[(menu.indexOfSelectedItem + 1)...].contains { $0.representedObject != nil }
     }
     
     

        
        guard let popUp = self.outlineMenu, self.canSelectPrevItem else { return }
        
        let index = stride(from: popUp.indexOfSelectedItem - 1, to: 0, by: -1)
            .first { popUp.item(at: $0)!.representedObject != nil } ?? 0
        
        popUp.menu!.performActionForItem(at: index)
    }

        
        guard let popUp = self.outlineMenu, self.canSelectNextItem else { return }
        
        let index = popUp.itemArray[(popUp.indexOfSelectedItem + 1)...]
            .firstIndex { $0.representedObject != nil }
        
        if let index = index {
            popUp.menu!.performActionForItem(at: index)
