Check for attachments store
added code comments
Merge pull request #215 from andygup/detect_attachment

Verify if attachmentsStore initialized when layer has attachments