Write more tests for this isnull check and more tests