Added class assertion variants that take a class to check at runtime.