Added QUnit tests for simpleQuery#toType.
Fixed JSDoc and API.md, added arguments check for #toType.