title: Angular ngOnChanges can not read property first time
body: <p>I'm trying to access data from an input to a component, and using ngOnChanges to do so, but throwing error in console like <code>"can not read property 'name' of undefined"</code> but data loading  properly. </p>
  
  <p>After debugging, this issue occurs only when page refresh. First time data would be undefined and second time data is loading.</p>
  
  <p>What am I doing wrong here?</p>
  
  <pre><code>@Input() data: any;
  
   ngOnChanges(changes: any) {
      if(changes['data']) {
        this.dispEn = this.data.name.en;
        this.dispDe = this.data.name.en;
                }
    }
  </code></pre>