raise an error if any input to merge_text is not a string