Add a type-check for a stream in with-html-output.

Avoids confusion caused in Issue #14.