title: ERROR TypeError: Cannot read property 'id' of null
body: <p>I am trying to show the list of values in MatBottomSheet from another component. I am always getting error like below.</p>
  <blockquote>
  <p><strong>ERROR TypeError: Cannot read property 'id' of null</strong></p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/i6yRS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i6yRS.png" alt="enter image description here" /></a></p>
  <p>I am passing values from <strong>testcomponent</strong> like below:</p>
  <pre><code>  openBottomSheet(order) {
      const id = order;
      console.log('====&gt;' + JSON.stringify(id));
      console.log('====&gt;' + JSON.stringify(order));
      const MatBottomSheetRef = this._bottomSheet.open(ProductbottomComponent, {
        data: id,
      });
      this._bottomSheet.open(ProductbottomComponent);
    }
  </code></pre>
  <p>And calling above component to another <strong>ProductbottomComponent typescript</strong> is</p>
  <pre><code>ngOnInit() {
      this.http.get('/api/getorder/' + this.authService.namespace + '/' + this.data.id)
          .subscribe(result =&gt; {
            this.model = result;
            console.log('-====&gt;' + JSON.stringify(this.model));
          });
  }
  </code></pre>
  <p><strong>productbottom.component.html (here is a part of my template)</strong></p>
  <pre><code>&lt;table cellpadding=&quot;10&quot; width=&quot;100%&quot;&gt;
          &lt;thead&gt;
              &lt;tr style=&quot;text-align:left&quot;&gt;
                  &lt;th&gt;Item&lt;/th&gt;
                  &lt;th&gt;Qty&lt;/th&gt;
              &lt;/tr&gt;
              &lt;tr *ngFor=&quot;let del of model.products&quot;&gt;
                  &lt;td&gt;{{del.name}}&lt;/td&gt;
                  &lt;td&gt;{{del.quantity}}&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
      &lt;/table&gt;
  </code></pre>
  <p>Getting values in console log</p>
  <pre><code>{&quot;id&quot;:&quot;0504fd10-1278-41bf-b052-a459c1e37998&quot;,&quot;products&quot;:[{&quot;productid&quot;:&quot;&quot;,&quot;name&quot;:&quot;Snowball&quot;,&quot;price&quot;:&quot;5.00&quot;,&quot;quantity&quot;:1}],&quot;order&quot;:&quot;Order - 1005&quot;,&quot;name&quot;:&quot;test123&quot;,&quot;email&quot;:&quot;test@gmail.com&quot;,&quot;mobile&quot;:&quot;111111111&quot;,&quot;status&quot;:&quot;Packing In Progress&quot;,&quot;note&quot;:&quot;&quot;,&quot;packedby&quot;:&quot;test78&quot;,&quot;packedbyId&quot;:&quot;1bd9632a-406a-4212-a8c0-d0732ab42635&quot;,&quot;packeddate&quot;:&quot;&quot;,&quot;deliveredby&quot;:&quot;&quot;,&quot;deliveredbyId&quot;:&quot;&quot;,&quot;delivereddate&quot;:&quot;&quot;,&quot;type&quot;:&quot;testPickup&quot;,&quot;address1&quot;:&quot;&quot;,&quot;address2&quot;:&quot;&quot;,&quot;city&quot;:&quot;&quot;,&quot;state&quot;:&quot;&quot;,&quot;zip&quot;:&quot;&quot;,&quot;createddate&quot;:&quot;2020-07-06 22:07:17&quot;,&quot;lastModifieddate&quot;:&quot;2020-07-06 22:07:17&quot;}
  </code></pre>
  <p>Help me to fix it!</p>