def METHOD_NAME(self, key, value):
    if not value:
        raise ValueError('Comment text cannot be empty')
    if value.isspace():
        raise ValueError('Comment text cannot consist of only whitespace')
    return value