Adding unit test for type checking in `if`.