title: How to check if a variable exists in flex
body: <p>In flex, how to check if a variable exists? I have tried using </p>
  
  <pre><code>if (this['some_variable'] != undefined) {
      //do something
  }
  </code></pre>
  
  <p>There is a run time error saying the property <code>some_variable</code> does not exists. I have checked with <code>null</code> instead of <code>undefined</code>, still the same error.</p>
  
  <p>please help.</p>
  
  <p><strong>[EDIT]</strong></p>
  
  <p>Based on the replies I have used <code>this.hasOwnProperty('variable_name')</code>. I found that its returning <code>true</code> if <code>variable_name</code> is a <code>public</code> but <code>false</code> if its <code>private/protected</code>. How to check for a private variable?</p>