* Add HasProperty check (`i in object`)
* Only read `object[i]` once because there may be getters with side-effects

```javascript
if (i in object) {
  var value = object[i];
  if (predicate.call(thisArg, value, i, object)) {
    return returnIndex ? i : value;
  }
}
```