it works using only && but in fact && doesn't do the job. the expression before && is evaluated to boolean. I don't know if it's part of the ECMA standard, how this should be done.

However ```instanceof``` seems to be enough: http://jsfiddle.net/5w29q/1/