Add more validation in the `PDFDocument._hasOnlyDocumentSignatures` method
Add more validation in the `PDFDocument._hasOnlyDocumentSignatures` method

If this method is ever passed invalid/unexpected data, or if during the course of parsing (since it's used recursively) such data is found, it will fail in a non-graceful way.
Hence this patch, which ensures that we don't attempt to access non-existent properties and also that errors such as the one fixed in PR 12479 wouldn't have occured.

Shoobx/pdf.js,macroplant/pdf.js,mozilla/pdf.js,showpad/mozilla-pdf.js,Shoobx/pdf.js,Snuffleupagus/pdf.js,macroplant/pdf.js,xavier114fch/pdf.js,caremerge/pdf.js,macroplant/pdf.js,showpad/mozilla-pdf.js,showpad/mozilla-pdf.js,Snuffleupagus/pdf.js,nawawi/pdf.js,caremerge/pdf.js,Snuffleupagus/pdf.js,Shoobx/pdf.js,timvandermeij/pdf.js,timvandermeij/pdf.js,mozilla/pdf.js,xavier114fch/pdf.js,timvandermeij/pdf.js,nawawi/pdf.js,nawawi/pdf.js,mozilla/pdf.js