Selectmenu: Prevent exception when the user types in selectmenu, when teh result is an optgroup