[PATCH 9/9] core: explicitly compare pointers to NULL