The `getArgs` method returns an array of `ol.expr.Expression`.  Either here or below (in the `FeatureId` writer) you should assert that the expressions are `ol.expr.Literal` and call `expr.getValue()` to get the fid.