Implement "as Foo" coercion of params.