Do not overwrite tag OR append to tag


When using source scripts is there a way to check if a tag already exists and, if it does, either choose to not overwrite the exiting value OR append a value to the existing tag?

Examples of this would be:
if composer tag exists do not overwrite with a new value
if genre exists append the new genre to the tag (existing list of genres)