Use ducktyping to detect streams, return early instead of else