Use assertIsInstance in test code.

This'll give much more understandable test output when these tests fail.