We either need to disallow the `type` attribute with `expression` (and the expression has to evaluate to the required type) or, do as we do with headers (use a message processor that has the type information), so the expression can be converted to the requested type at runtime).