def str_without_suffix(data: str, suffix='/'):
    """Removes suffix (if present) from string.

    Args:
        data (str):
        suffix: suffix to be remove, defaults to '/'

    Returns:
        str: the string without the suffix if it was present
    """
    if data is None:
        return None
    return data if not data.endswith(suffix) else data[:-len(suffix)]
