Unexpected error after creating a package
### Describe the bug

Unexpected error when creating a package

### To Reproduce
Steps to reproduce the behavior:
1. Start gaphor
2. Select sysml
3. Select each element and press delete to remove all package
4. Create new package diagram
5. Select the diagram on left side and press right mouse click
6. Select new package menu item

OS: Windows (10)
Python version: 3.11.1
GTK version: 4.8.1
Display: GdkWin32Display
Gaphor version: 2.14.0

Errors:

Time since application startup: 0:01:01
|Traceback (most recent call last):
|  File "F:\\Development\\Tools\\Gaphor\\gaphor-2.14.0-portable\\data\\gaphor\\ui\\actiongroup.pyc", line 191, in _action_activate
|  File "F:\\Development\\Tools\\Gaphor\\gaphor-2.14.0-portable\\data\\gaphor\\ui\\treecomponent.pyc", line 159, in tree_view_create_package
|AssertionError
└─────────────────────────────╌┄┈


### Expected behavior
A clear and concise description of what you expected to happen.

### Screenshots
If applicable, add screenshots to help explain your problem.

### OS
- [ ] Linux (Please put in notes the specific distro)
- [ ] macOS
- [X] Windows

### Version
Version of Gaphor: 2.14.0

### Additional information
Add any other context about the problem here.

diff --git a/gaphor/ui/namespace.py b/gaphor/ui/namespace.py
index 5f8c946e2..7339c49ec 100644
--- a/gaphor/ui/namespace.py
+++ b/gaphor/ui/namespace.py
@@ -55,7 +55,8 @@ def popup_model(element, modeling_language):
     part.append_submenu(
         gettext("New _Diagram"), create_diagram_types_model(modeling_language)
     )
-    part.append(gettext("New _Package"), "tree-view.create-package")
+    if isinstance(element, UML.Package):
+        part.append(gettext("New _Package"), "tree-view.create-package")
     model.append_section(None, part)
 
     part = Gio.Menu.new()
['gaphor/ui/namespace.py']