replace typeof names === 'string' with _.isString(names)