def listify(obj):
    """Ensure that the object `obj` is of type list.

    If the object is not of type `list`, the object is
    converted into a list.

    Parameters
    ----------
    obj :
        The object.

    Returns
    -------
    list :
        The object inside a list.

    """
    if obj is None:
        return []

    return obj if isinstance(obj, (list, type(None))) else [obj]