title: Ngrx 8 mistakenly claims my state is unserializable
body: <p>I recently updated a project at work to Angular 8, and consequently, Ngrx 8.  I noticed that once I did so, I started getting this warning message in my builds/test runs:</p>
  
  <p><code>WARN: '@ngrx/store: runtime checks are currently opt-in but will be the default in the next major version with the possibility to opt-out, see https://ngrx.io/guide/migration/v8 for more information.'</code></p>
  
  <p>So I read the doc, said to myself, "Okay, fine no big deal. My state should be serializable."  However, on at runtime, I would get this error:</p>
  
  <p><code>ERROR Error: Detected unserializable state at "rootState...</code></p>
  
  <p>I had no idea why it thought this.  I could get it to work with the following config for my StoreModule.forRoot declaration:</p>
  
  <pre><code>runtimeChecks: {
            strictStateImmutability: false,
            strictActionImmutability: false,
            strictStateSerializability: true,
            strictActionSerializability: false,
          }
  </code></pre>
  
  <p>but I still didn't understand why it thought there was a problem with my state.  After investigating, it seems that any object in state instantiated as an es6 class is considered unserializable.  See <a href="https://stackblitz.com/edit/angular-ngrx-serialization-poc" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-ngrx-serialization-poc</a> for a proof of concept (and look at the console window).</p>
  
  <p>It seems the reason why is because of this line, in the <code>isPlainObject</code> method (<a href="https://github.com/ngrx/platform/blob/master/modules/store/src/meta-reducers/utils.ts" rel="nofollow noreferrer">https://github.com/ngrx/platform/blob/master/modules/store/src/meta-reducers/utils.ts</a>, line #38):</p>
  
  <pre><code>  const targetPrototype = Object.getPrototypeOf(target);
    return targetPrototype === Object.prototype || targetPrototype === null;
  </code></pre>
  
  <p>My question is, am I correct that this code will only pass on an object literal? (i.e. <code>const x = {}</code>).  I don't understand why an es6 class would be considered unserializable, or am I missing something?</p>