Added nil check.