Error that show on console is:

```
TypeError: Cannot read property '0' of null
    at app.post (/root/src/master.js:24:29)

```

master.js 24:29 is this

```
let outputs = req.body.outputs
  let outs = []
  for (let out of outputs) {
   outs.push({
     address: out.addresses[0],
      value: out.value
    })}
  }

```

line 24 is address: 
`out.addresses[0],`

request from this json 

```
"outputs": [
{
"value": 10000,
"script": "a91402f42dce015def2fab0b1d6f7f6c742bae66e75e87",
"addresses": [
"31xdnmzVzmAQ5CaWxtiDr3jwCFfeUpHEb1"
],
"script_type": "pay-to-script-hash"
},
{
"value": 1020,
"script": "0014396ef6487043092385338ccfe9d327fb031975d6",
"addresses": null,
"script_type": "pay-to-witness-pubkey-hash"
}
]

```

Can someone help me fix this? Thanks a lot!