refractor(tests): use a()/an() for typeof expectations

expect.js [does not handle null to be of a the object type](https://github.com/LearnBoost/expect.js/blob/master/index.js#L614).