Add a sanity check to prevent cryptic NPE when trying to access number value after parser closed
(often auto-closed due to exception or such)
diff --git a/src/main/java/com/fasterxml/jackson/core/base/ParserBase.java b/src/main/java/com/fasterxml/jackson/core/base/ParserBase.java
index 8726e90..52984a8 100644
--- a/src/main/java/com/fasterxml/jackson/core/base/ParserBase.java
+++ b/src/main/java/com/fasterxml/jackson/core/base/ParserBase.java
@@ -745,9 +745,16 @@
      */
     protected void _parseNumericValue(int expType) throws IOException
     {
+        // 12-Jun-2020, tatu: Sanity check to prevent more cryptic error for this case.
+        //    (note: could alternatively see if TextBuffer has aggregated contents, avoid
+        //    exception -- but that might be more confusing)
+        if (_closed) {
+            _reportError("Internal error: _parseNumericValue called when parser instance closed");
+        }
+
         // Int or float?
         if (_currToken == JsonToken.VALUE_NUMBER_INT) {
-            int len = _intLength;
+            final int len = _intLength;
             // First: optimization for simple int
             if (len <= 9) { 
                 int i = _textBuffer.contentsAsInt(_numberNegative);
@@ -792,6 +799,12 @@
      */
     protected int _parseIntValue() throws IOException
     {
+        // 12-Jun-2020, tatu: Sanity check to prevent more cryptic error for this case.
+        //    (note: could alternatively see if TextBuffer has aggregated contents, avoid
+        //    exception -- but that might be more confusing)
+        if (_closed) {
+            _reportError("Internal error: _parseNumericValue called when parser instance closed");
+        }
         // Inlined variant of: _parseNumericValue(NR_INT)
         if (_currToken == JsonToken.VALUE_NUMBER_INT) {
             if (_intLength <= 9) {