Uncaught TypeError: Cannot read property 'value' of undefined

Uncaught TypeError: Cannot read property 'value' of undefined

$.widget( "custom.catcomplete", $.ui.autocomplete, {
_renderMenu: function( ul, items ) {
var self = this,
                        currentCategory = "";
$.each( items, function( index, item ) {
//alert("index="+index+" and item = "+item);
                              alert(item.value);
if ( item.subcategory != currentCategory ) 
{
ul.append( "<span class='ui-autocomplete-category' style='float:left;'> -- In "+ item.subcategory + "  </span>" );
currentCategory = item.subcategory;
}

                                return $( "<li></li>" )                              
                                .append( "<a target='_blank' href='localhost/vsp/product_description.php?pid="+item.id+ "'>"+ item.value + "</a>" )
                                .appendTo( ul ); 
                             
});
}
});
$(function() {
$( "#search" ).catcomplete({
delay:0,
source: "searchProd.php?termm="+ $("#search").val(),
});
});
$(".ui-menu-item").on('click', function(e) {
location.href = $(this).children("a").attr("href") ;
});