Import examples_context_sensitive.json file, select “Object Context Sensitive Menu” and replace it’s command with this (Command tab):
name = C.selected_objects and C.active_object and C.active_object.type.title() or "Object (None)"; open_menu(name) or open_menu("Object")
Now “Object Context Sensitive Menu” will open “Object (None)” menu if there is no selected object in your scene.