def ensure_string(arg):
    if not (isinstance(arg, str)):
        if arg is None:
            return ""
        else: