title: Checking if a state object is empty
body: <p>I have a react js state object and would like to execute some code if the object is empty. Is there something wrong with my logic because the code inside the if block is not getting executed. </p>
  
  <pre class="lang-js prettyprint-override"><code>if (this.state.errors == null) {
    this.props.updateUser(user);
    this.props.navigation.goBack();
  }
  </code></pre>