Fix null pointer exceptions in test
Fix null pointer exceptions in test

These weren't a problem before, because if a method call on a `null` object doesn't try to access any instance members, the call won't fail.

svunit/svunit,svunit/svunit,svunit/svunit