from pathlib import Path


def keys_to_path(dict_, *keys):
    """ Convert all keys to Path, if they are not None. """
    for key in keys:
        value = dict_[key]
        dict_[key] = None if value is None else Path(value)
    return dict_