Factor out adding return type check.
Get return type checks in place.

Doesn't emit check code at all for unconstrained.