Simplify.
Simplify.

This is a simpler check, a faster check, avoids a switch (those are gross), and will automatically be extensible if new "typeof" values are added in the future.

see http://jsperf.com/testing-value-is-primitive/7 - of course, micro-benchmarks are silly and don't cover real world use cases, so it's pretty irrelevant. Note that on Safari, isPrimitive_or is fastest, as opposed to the switch alternatives, which are way slower - and "simple" is the fastest overall.
jonschlinkert/is-primitive