Fix error in some throws_like tests

The test would throw an exception "Cannot look up attributes in a type object".
As part of debugging, I decided to make these methods only take defined
objects, in the hope that the error message would get clearer.  To my
surprise, the problem went away completely.  This feels like action at
a distance.