def to_string(s, encoding=None, errors='strict'):
    """Inverse of to_bytes"""
    if isinstance(s, bytes):
        return s.decode(encoding or 'utf-8', errors)
    elif not isinstance(s, str):
        return str(s)
    else:
        return s