Add tests for first and lasts in different types.