This isn't quite right. The encoding can't just be ignored if the output stream is ```null```.