You don't need the `or` for `cookie-policy`, since you're already inside the `when`, you can just use `(str (type cookie-spec-factory))`.

I think you should prefer `type` over `class` for this, in case someone wants to do something fancy with `type` metadata.