CommandFinderPanel: be defensive about nulls

This change guards against the possibility of the menu path's leaf
coming back null. With this change, the Command Finder UI no longer
throws NPE while browsing through the full list of commands.