fixed didReceive nil check error