Fixes exeption, if `map` return null or undefined