title: React - check props
body: <p>I have a simple, quick question. There's a lot of situation where we have to check if props are undefined.</p>
  
  <p>What about nested props, for example we have:</p>
  
  <pre><code>this.props.data.income.data1.value.chartData
  </code></pre>
  
  <p>and we want to check if chartData exist </p>
  
  <p>it has to be a better, more clear way than </p>
  
  <pre><code>if(
  this.props.data &amp;&amp; 
  this.props.data.income &amp;&amp; 
  this.props.data.income.data1 &amp;&amp;     
  this.props.data.income.data1.value &amp;&amp; 
  this.props.data.income.data1.value.chartData!==null
  )
  </code></pre>
  
  <p>I cant just check this.props.data.income.data1.value.chartData!==null </p>
  
  <p>Please tell me how do you solve it in your projects?</p>