Fixed null check.