Add additional nil asserts in unit test