def validate_string(value, choices=None):
    """Validate string."""
    if not isinstance(value, str):
        raise ValueError(f'Value {value} should be a string.')
    if choices and value not in choices:
        choices_ = ', '.join(choices)
        raise ValueError(f'Value {value} should be one of {choices_}.')
