Types

Adds a basic type checking module to enforce types in a coherent way.
I opted not to use a external module for this because I didn't find one that was similar enough to what I wanted, without adding boiler plate code everywhere.

Open to that idea though if it exists already, as I'm not a huge fan of having this included.

**edit:** Note, this doesn't add or remove any type checking that wasn't already being done with `assert`.
I'd say hold off performance optimization until there's concrete evidence that this is indeed a performance bottleneck. As browsers/v8 are constantly optimizing, this code could get in the way of performance instead without us knowing.