from typing import List


def yaml_str_list(o) -> List[str]:
    """
    Convert and flatten input to a list of str.

    the input may be None, str, a list of str, or a list of them recursively.
    """
    if o is None:
        return []
    elif isinstance(o, str):
        return [o]
    else:
        r = []
        for s in o:
            r.extend(yaml_str_list(s))
        return r