Fix 'add()' in IE8.

The custom `type` function fails on IE8, returning `"object"` when given
`undefined` as its argument. This breaks (at least) the `add` function for me. The
jQuery version doesn't have this problem, and since it already exists and follows the
same semantics our custom `type` currently uses, it's a drop-in replacement.