It looks like hasOwnProperty() does not work on InDesign objects...
This causes an error:
Here's the error that I get:
Error: Error #2091: The Proxy class does not implement hasProperty. It must be overridden by a subclass.
Retrieving data ...