Added test for exception thrown when reading unexpected object type