Add a check for non-existing collection

Add a check before trying to output a link to the collection that does not exist.
Merge pull request #1632 from jaromirdalecky/fix-conversation

Add a check for non-existing collection