Merge "Add the null ptr check that's not merged in master"