Added a test for typecase.