Protect against empty context menus in edit task

Protext against index out of bounds exceptions on empty context menus within the edit task and add task views