added nil check for people