to avoid app crash when passing nil value in NSDictionary