better type checking to include Date and RegExp
additional tests for Date and RegExp comparisons
bump ver and add extra cases to type function to handle browsers like Phantom that return strange values for Object.prototype on null and undefined values
tidy type fn