How to resolve undefined Input Angular? : <p>There is input data in component:</p>

<pre><code>  @Input() pupil: Pupil;
</code></pre>

<p>Before rendering this data in template I need to map it:</p>

<pre><code> ngOnChanges() {
    this.pupil.photo = Helper.getPhoto(this.pupil);
  }
</code></pre>

<p>But I get error cause <code>this.pupil</code> in undefined, but after I can see filled object.</p>

<p>How to await result from Input?</p>

<p>In template I have <code>*ngIf="pupil"</code></p>
