This could be changed as follows:

```js
if (!obj.fids.hasOwnProperty(fid)) {
  obj.fids[fid] = new ol.expr.Literal(fid);
}
```

This assumes you use dot notation instead of bracket notation everywhere for the `fids` property.