title: Why am I getting TypeError when adding a property to an Observable
body: <p>I am trying to add a property on an Observable after subscribing and assigning the response in my Angular 4 app.</p>
  
  <pre><code>getCourses() {
    return this.coursesService.getCourses().subscribe(
      res =&gt; {
        this.courses = res;
        for (const course of this.courses) {
          course.isChecked = false;
        }
      }
    );
  }
  </code></pre>
  
  <p>The code works and creates the property on the Observable but I get the error below as well.</p>
  
  <pre><code>ERROR TypeError: Cannot create property 'isChecked' on boolean 'false' at SafeSubscriber._next at SafeSubscriber.webpackJsonp.../../../../rxjs/Subscriber.js.SafeSubscriber.__tryOrUnsub
  </code></pre>
  
  <p>How can I correct the code so that I don't get errors?</p>
  
  <p>Solved!!!</p>
  
  <p>So I didn't realize that at the end of the array of objects that the api was returning was false.</p>
  
  <p>[{ "PersonID": "129", "FirstName": "Ash", "MiddleName": "E.", "LastName": "Green", "MemberID": "129346", "MemberNumber": "105", "MemberStatus": 2, "AffiliatedAgencyID": "160" }, { "PersonID": "221334", "FirstName": "Abs", "MiddleName": null, "LastName": "Plast", "MemberID": "1953", "MemberNumber": "2047", "MemberStatus": 1, "AffiliatedAgencyID": "13" }, false]</p>
  
  <p>Once I created an if statement to account for the false at the end, my problem was fixed. The other object I was getting doesn't have this anomaly. So it wasn't happening.</p>