         if (newIndex >= 0)
         {
             var item:Object = dataProvider ? dataProvider.getItemAt(newIndex) : undefined;
-            if (item)
+            if (item && textInput)
             {
-                var itemString:String = itemToLabel(item);
+                var itemString:String = itemToLabel(item); 
                 textInput.selectAll();
                 textInput.insertText(itemString);
                 textInput.selectAll();

        {
            setSelectedIndex(actualProposedSelectedIndex, true);
        }
                
        textInput.selectRange(-1, -1);
        
        userTypedIntoText = false;
    }

     */
    override public function setFocus():void
    {
        if (stage && textInput)
        {            
            stage.focus = textInput.textDisplay;            
        }
