Replace all (x == NULL) or (x != NULL) in assert and if conditions by !x and x.