does it have to be MenuItem (this class)? i think it can be any NodeInterface - the code also checks for NodeInterface, not MenuItem.