Template is not guaranteed to be NULL when not specified, it may also be an
empty string.

Check for that case as well since we can't interpret it as valid XML in such a
case.
Merge pull request #110 from nigelgbanks/7.x-fix-whitescreen-of-death

Fix white screen of death.