``if isinstance(metadata, str) or isinstance(metadata, unicode):``