from pathlib import Path


def makelist(x):
    """If x is not a list (or is a string), make a list containing x."""
    if x is None:
        return []
    elif isinstance(x, (str, Path)):
        return [x, ]
    else:
        return x