Preventing undefined index notices in menu connector