Better stream checking.