title: Angular 2/4 compile using AoT error - extendStatics
body: <p>I have an application which I'm trying to compile using AoT. When I build the application I'm getting the following error:</p>
  
  <blockquote>
    <p>C:\test\node_modules\@angular\compiler-cli\src\diagnostics\expression_diagnostics.js:14</p>
    
    <p>extendStatics(d, b);</p>
    
    <p>^ TypeError: Object prototype may only be an Object or null: undefined</p>
  </blockquote>
  
  <p>I know there are certain things that work with JIT compilation that don't with AoT, so my suspicion is I might have something in my code might not work with AoT. Any idea what could be the cause of this error please?</p>
  
  <p><strong>Angular and TypeScript Version</strong></p>
  
  <ul>
  <li>Angular Version: 4.0.1</li>
  <li>Angular Compiler CLI: 4.2.5</li>
  <li>TypeScript: 2.3.4</li>
  </ul>