from typing import Union
from typing import List


def validate_input_data(input: Union[str, List[str]]) -> Union[str, List[str]]:
    """Validates if the input is a string, list of strings and not empty"""
    
    # check if input is list
    if isinstance(input,list):
        # check if list is empty
        if len(input) == 0:
            raise ValueError("Passed an empty list.")
        # check if all list items are non-empty strings
        for i, item in enumerate(input):
            if not isinstance(item,str):
                raise TypeError(f"The list item at position {i} is not a string.")
            if item == "":
                raise ValueError(f"The list item at position {i} is an empty string.")
        return input
    # check if input is non-empty string
    elif isinstance(input,str):
        if input == "":
            raise ValueError("Passed an empty string.")
        return input
    else:
        raise TypeError("The passed object is neither a string nor a list of strings.")