def check_and_raise(condition, exception_content=None, exception_type:
    Exception=Exception):
    """Raises an exception when condition is not met
    
    Arguments:
        condition {Any} -- condition to check against
    
    Keyword Arguments:
        exception_content {Any} -- value that will be passed to exception initialization (default: {None})
        exception_type {Exception} -- the exception type to be raised (default: {Exception})
    
    Raises:
        exception_type: the exception of type exception_type, given in the parameter
    """
    if not condition:
        if exception_content is not None:
            raise exception_type(exception_content)
        else:
            raise exception_type
