Add a null check.