Changes to support the doc.tags importantion

In this change, I have implemented a condition to support tags imports.

IMPORTANT: If the doc already exist and it has tags, they will be discarded and will be replaced from the tags from the csv/xml.