Extension and helper functions for working with Stream in Dart