replace typeof selector == 'string' with _.isString(selector) in the traversing.js