Implement type checking return values.