jQuery("does not exist ").data() throws exception

jQuery("does not exist ").data() throws exception

the following code from jQuery(1.4.2).fn.extend(  { data : function {.........} } ):
  1. if ( typeof key === "undefined" && this.length ) {
  2. .....
  3. } else if ( typeof key === "object" ) {
  4. ......
  5. }
does not handle the situation when:  key is undefined,and this.length===0,
next line of code:
  1. var parts = key.split(".");
cause the exception because key is undefined.
I think jQuery("does not exist ").data() should return undefined , instead of throwing an exception.