def _validate_static_url_path(static_url_path):
    """
    Validates the given static folder value.

    Parameters
    ----------
    static_url_path : `str`
        Static url path value to validate.

    Returns
    -------
    static_url_path : `None` or `str`
        The validated static url path value.

    Raises
    ------
    TypeError
        If `static_url_path` was not given either as `None` or `str` instance.
    """
    if static_url_path is not None:
        if type(static_url_path) is str:
            pass
        elif isinstance(static_url_path, str):
            static_url_path = str(static_url_path)
        else:
            raise TypeError(
                f'`static_url_path` can be given as `str` instance, got '
                f'{static_url_path.__class__.__name__}.'
            )

    return static_url_path