two approaches

1) yours but  

```js
out.type = [addrType];
````

2) mine

return {
   type: [addrType],
   streetAddress = addrValue.street || '',
   // bla bla
}