title: Testing for undefined and null child objects in ActionsScript/Flex
body: <p>I use this pattern to test for undefined and null values in ActionScript/Flex :</p>
  
  <pre><code>if(obj) {
      execute()
  }
  </code></pre>
  
  <p>Unfortunately, a ReferenceError is always thrown when I use the pattern to test for child objects :</p>
  
  <pre><code>if(obj.child) {
      execute()
  }
  
  ReferenceError: Error #1069: Property child not found on obj and there is no default value.
  </code></pre>
  
  <p>Why does testing for child objects with if statements throw a ReferenceError?</p>
  
  <p>Thanks!</p>