[ASan] make the check for NULL more portable.