Add assert_null and assert_not_null function

Using these two functions to instead the repeat checking statement