from typing import Optional
from typing import List
from pathlib import Path


def to_pathlib_path(path: Optional[List[str]], default: Optional[List[Path]] = None) -> List[Path]:
    """Normalize optional ``path`` argument of tasks into ``List[Path]``."""
    if not path:
        return default if default else []

    return list(map(Path, path))