Fix :data() checking values rather than existence

As the docs say - "Selects elements which have data stored under the specified key." - this allows you to store empty data such as "0" or empty Objects and Arrays, which is still valid data. 

Before the fix storing an array index would break without modifying on both read and write if you wanted to use this selector.

Fixes #5403