Verify element exists before accessing.

Currently when the parser utility classes are outputting to a text buffer we do
not verify that an element from an array exists before accessing. We can have
null items in arrays (and dictionaries but the dictionary case is already
handled).

This Cl updates the code to check the element exists before attempting to use
the element.

BUG=chromium:641076

Review-Url: https://codereview.chromium.org/2292473004
diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp b/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
index a738356..6b19582 100644
--- a/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
+++ b/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
@@ -179,7 +179,7 @@
       buf << "[";
       for (size_t i = 0; i < p->GetCount(); i++) {
         CPDF_Object* pElement = p->GetObjectAt(i);
-        if (pElement->GetObjNum()) {
+        if (pElement && pElement->GetObjNum()) {
           buf << " " << pElement->GetObjNum() << " 0 R";
         } else {
           buf << pElement;