an exception is thrown in the case of an invalid selector (like `".foo["`), maybe there are some other cases I'm not aware of (`$(document).is(".foo")` returns false), I've added the catch block for safety.  
should I add something like `console.warn("bad selector:", selector)` ?