jquery Library1.5 inclusion issue

jquery Library1.5 inclusion issue

Hi,
   I am using jquery version(jquery-1.5). I am receiving the error as
     elem is undefined
    for the condition


if ( elem.nodeName ) {

for the below part inside the library



// A method for determining if a DOM node can handle the data expando
 acceptData: function( elem ) {
 if ( elem.nodeName ) {
 var match = jQuery.noData[ elem.nodeName.toLowerCase() ];

 if ( match ) {
 return !(match === true || elem.getAttribute("classid") !== match);
 }
 }

 return true;}

Can any one guide me please what could be the issue.