Should $("#unfound").data() return null?

Should $("#unfound").data() return null?

I found when a jQuery set is emtpy such as $() or $("#unfound") the .data() method throws an exception. I would expect it to return null.

I've made a fix and committed it to my forked git repo. But I wanted to ask first if that is the correct behavior. And if so, who do I include on the pull request for little bugs like this?