Handle Undefined value when emitting a map function