different ways to detect if a property belongs to an object with caveats