Added some tweaks to $.type to handle null and undefined. Added a bunch of unit tests...