Fix load(beat) check for instanceof Beat.

Added test for load(beat) checking that beat is an instanceof Beat.

I noticed that the check was incorrect. `(!beat instanceof Beat)` was checking whether "not beat" was an instance of beat. The correct check is for `(!(beat instanceof Beat))`, that is: the negation is applied to the expression `(beat instanceof Beat)`.

I also changed `throw this.stack.error` to `throw new Error`, because `this.stack` was undefined.