Fix PHP Notices from document.parser

We're logging PHP Notices in our dev env, and our error.log is filled with PHP Notices from this file.

This fix should eliminate that.