Fix test failures due to bad logging by making sure __str__ doesn't return None when rendering a document.