Return type determined via type extraction.
Added test cases.