[FEATURE] Adding a _throwIf function for stream modules.

This should reduce the number of false positives in Coverity.
Merge pull request #621 from holtgrewe/feature/throw-if-function

[FEATURE] Adding a _throwIf function for stream modules.