Fixes exeption, if `map` return null or undefined
Merge pull request #133 from mrAdm/map-fixes

Fixes exeption if `map` return null or undefined