from typing import Dict, Union, List, Optional


def foo(x: Union[Dict[str, str], List[str]]) -> Optional[List[int]]:
    pass
