Implemented hasType and notHasType

Based on @dbushong's implementation in #2, integrating my feedback for that branch, and mergeable with current master. Error messages for the negative assertions also fixed, and I added `Date`, `NaN`, `null` and `undefined` "types" too (latter three being rather more special case constants that may happen) besides those in David's original branch.