def _validate_import_name(import_name):
    """
    Validates the given `import_name` value.

    Parameters
    ----------
    import_name : `str`
        The import name's value.

    Returns
    -------
    import_name : `str`
        The validated import name.

    Raises
    ------
    TypeError
        If `import_name` was not given as `str` instance.
    ValueError
        If `import_name` is an empty string.
    """
    if type(import_name) is str:
        pass
    elif isinstance(import_name, str):
        import_name = str(import_name)
    else:
        raise TypeError(
            f'`import_name` can be given as `str` instance, got {import_name.__class__.__name__}.'
        )

    if not import_name:
        raise ValueError(f'`import_name` cannot be given as empty string.')

    return import_name