Adding null check.