Option coercion middleware