Fix the test case.
Add some additional test cases to ensure errors are trapped.  Remove
unneeded check for null.