Corrected some bugs in null handling test