checking if an object has a property