.data() inconsistent return value

.data() inconsistent return value

The .data() function returns inconsistent values:
If you try to load a not-existing-value of an object, which does not have ANY values stored, it will return null.
But if this object has ANY value stored in it, and you load the not-existing-value, it returns "undefined".

Example:
  1. <div id="div1">test</div>
  2. <script type="text/javascript">
  3.    console.log($("#div1").data("test")); // -> result: null
  4.       $("#div1").data("abcdefg", 1);
  5.       console.log($("#div1").data("test")); // -> result: 'undefined'
  6. </script>
That's not what it should be like, is it?