This should probably continue to reject non-element non-document nodes, also for [1.x](https://github.com/jquery/jquery/blob/03ab9b9f9061df1cf38fd6466c2241dfb2ae9cdc/src/data.js#L224-L234) compatibility.