[BUGFIX beta] Consistently use isStream helper.

There were a number of scenarios where we were not properly gaurding against `null` or `undefined` objects before checking for `isStream` on them.  This refactors all `someThing.isStream` checks to use the stream utility function which handles this properly.

Fixes #9910.