So we can simplify this block a bit:

```js
for (var objKey in obj) {
  if (objKey.charAt(0) !== '$') {
    var value = obj[objKey];

    // Will avoid adding `null` to the collection
    if (isObject(value) || isFunction(value)) {
      // If it's a circular reference, just proceed to the next property
      if (evaluatedObjects.indexOf(value) >= 0) continue;
      evaluatedObjects.push(value);
    }
    // No need to duplicate this call in two branches
    if (search(value, text)) {
      return true;
    }
  }
}
```