Add more checks in FaultHandler.

Make the code more robust when thinking it is dealing with an implicit
null check.

Test: test.py
Bug: 170587281
Change-Id: I5e1177377fb2dcee687a9f84693831f7d2de4b67
diff --git a/runtime/oat_quick_method_header.h b/runtime/oat_quick_method_header.h
index a725724..e347588 100644
--- a/runtime/oat_quick_method_header.h
+++ b/runtime/oat_quick_method_header.h
@@ -39,6 +39,11 @@
 
   bool IsNterpMethodHeader() const;
 
+  static bool IsNterpPc(uintptr_t pc) {
+    return OatQuickMethodHeader::NterpMethodHeader != nullptr &&
+        OatQuickMethodHeader::NterpMethodHeader->Contains(pc);
+  }
+
   static OatQuickMethodHeader* FromCodePointer(const void* code_ptr) {
     uintptr_t code = reinterpret_cast<uintptr_t>(code_ptr);
     uintptr_t header = code - OFFSETOF_MEMBER(OatQuickMethodHeader, code_);