title: Javascript/InDesign: Check if Object has certain property
body: <p>I'm using Javascript for InDesign scripting.</p>
  
  <p>I have an image object and want to know it's bounds (the one that the user sees) - </p>
  
  <pre><code>bounds = (geometricBounds in image.parent)? image.parent.geometricBounds: image.geometricBounds;
  </code></pre>
  
  <p>returns <code>ReferenceError - geometricBounds is undefined</code> . This error comes when the parent to the image is an Oval object (So, I know geometricBounds property is there for an Oval object).</p>
  
  <p>The problem is in <code>(geometricBounds in image.parent)</code> because when I alerted this statement, I got the same error. I'm surely missing something - because if this is not a property then I should simply get a false.</p>
  
  <p>Any one knows why this is happening?</p>