In the catalog patch, guard against None values for old_path

Real-world use case: plone.formwidget.contenttree in a recent dev-version passes in a navigation_tree_query that contains path as keyword, with query set to None. Therefore, we need to check if `old_path` and `old_path['query']` are not None before calling `split()` on it.