I don't think you need to check whether ```res.cloud.i``` is defined. IIRC there's already a check for this in the ```_.each``` function, you can pass ```undefined``` or ```null``` to it and it won't error.