from typing import Any
from pathlib import Path


def sanitize_path(v: Any) -> Any:
    """Sanitize path.

    Parameters:
        v : Maybe a Path. If ``v`` is a ``Path`` object, it is converted to a string.

    Returns:
        The sanitized object.
    """
    if isinstance(v, Path):
        return str(v)
    else:
        return v