title: The "TypeError: Cannot convert undefined or null to object" when using filter method" in Vue.js application
body: <p>The code looks as following:</p>
  
  <pre><code>getSections () {
    if (!this.document) {
      return []
    }
  
    return Object.keys(this.document.Sections).filter(x =&gt; this.document.Sections[x])
  }
  </code></pre>
  
  <p>The this.document.Sections is object that contains properties (objects as well).</p>
  
  <p>How to get rid of this error?</p>