The result of attachments.get(att) needs to be cast from an Object to a Map<String, Object>