Attachments might be an empty array.
Fix variable.