def is_raisable(obj) -> bool:
    """
    Test if object is valid in a "raise obj" statement.
    """

    return isinstance(obj, Exception) or (
        isinstance(obj, type) and issubclass(obj, Exception)
    )