Improved error checking in the Union tests.