This should be getting called with `ol.expr.Expression`.  Here you could assert that it is `ol.expr.Literal` and then call `getValue`.