title: Angular2 - TypeError: Cannot read property 'Id' of undefined in (Typescript)
body: <p>I'm getting the following error:</p>
  
  <pre><code>angular2.dev.js:23925 EXCEPTION: TypeError: Cannot read property 'Id' of null in [
  
  
  {{ product.Id }}
   in ProductEditComponent@0:68]
  </code></pre>
  
  <p>thrown with: </p>
  
  <pre><code>//Product-edit.component.ts:
  
  import {Component } from 'angular2/core';
  import { IProduct } from './product'
  import { ProductService } from './product.service'
  import { RouteParams } from 'angular2/router';
  @Component({
    template:`&lt;div class="wrapper wrapper-content animated fadeInRight ecommerce"&gt; 
                {{ product.Id }}
              &lt;/div&gt;`, 
  })
  export class ProductEditComponent{
      product: IProduct = null;
      errorMessage: string;
      constructor(private _routeParams: RouteParams, private _productService: ProductService){
  
      }
  
      ngOnInit(): void {
          this._productService.getProduct(this._routeParams.get('id'))
              .subscribe(
                  product =&gt; this.product = product,
                  error =&gt; this.errorMessage = &lt;any&gt;error);
  
  
      }
  
  }
  </code></pre>
  
  <p>ProductService: </p>
  
  <pre><code>getProduct(id: string): Observable&lt;IProduct&gt; {
      return this._http.get(this._baseUrl + this._getProductUrl + '/' + id)
          .map((response: Response) =&gt; &lt;IProduct&gt;response.json())
          .do(data =&gt; console.log("All: " + JSON.stringify(data)))
          .catch(this.handleError);
  }
  </code></pre>
  
  <p>Response from server: </p>
  
  <pre><code>{"Id":"34d4efcy6","ExternalId":null,"UserId":"testing","ProductProvider":null,"Title":"Flaska vin","Desc":null,"MinDeliveryTime":null,"MaxDeliveryTime":null,"FreightCost":null,"Brand":null}
  </code></pre>
  
  <p>What am I messing up? </p>