Check if the stream is closed.
bool isClosed() => streamController == null || streamController.isClosed;