Merge "Restore a mistakenly-removed null check"