Changed is_dividend_stock to raise exceptions rather than make assertions.