Fix for prerendered content sometimes prepended by 'null'

Don't prepend document.doctype to the prerendered content if it's null.