I did but typeof can't be used as Date and Array both come back as "object". I kept the comparison against the constructors but made it into a switch instead of if/else.