I got an unexpected internal NPE when playing with this script.

```
POST _scripts/painless/_execute
{
  "script": {
    "source": """
    return /[^\w]+/.split('abc   def higkln').toArray(String[]::new)
    """
  }
}
```
```
{
  "error" : {
    "root_cause" : [
      {
        "type" : "script_exception",
        "reason" : "compile error",
        "script_stack" : [ ],
        "script" : "\n    return /[^\\w]+/.split('abc   def higkln').toArray(String[]::new)\n    ",
        "lang" : "painless"
      }
    ],
    "type" : "script_exception",
    "reason" : "compile error",
    "script_stack" : [ ],
    "script" : "\n    return /[^\\w]+/.split('abc   def higkln').toArray(String[]::new)\n    ",
    "lang" : "painless",
    "caused_by" : {
      "type" : "null_pointer_exception",
      "reason" : "Cannot read field \"annotations\" because the return value of \"org.elasticsearch.painless.lookup.PainlessLookup.lookupPainlessClass(java.lang.Class)\" is null"
    }
  },
  "status" : 400
}

```
modules/lang-painless/src/main/java/org/elasticsearch/painless/phase/DefaultSemanticAnalysisPhase.java
throw userCompNode.createError(
                new ClassCastException(
                    "cannot apply the "
                        + operation.name
                        + " operator "
                        + "["
                        + operation.symbol
                        + "] to the types "
                        + "["
                        + PainlessLookupUtility.typeToCanonicalTypeName(leftValueType)
                        + "] and "
                        + "["
                        + PainlessLookupUtility.typeToCanonicalTypeName(rightValueType)
                        + "]"
                )
            );
        }
        if ((operation == Operation.EQ || operation == Operation.EQR || operation == Operation.NE || operation == Operation.NER)
            && userLeftNode instanceof ENull
            && userRightNode instanceof ENull) {
            throw userCompNode.createError(new IllegalArgumentException("extraneous comparison of [null] constants"));
        }
        if (operation == Operation.EQR || operation == Operation.NER || promotedType != def.class) {
            semanticScope.putDecoration(userLeftNode, new TargetType(promotedType));
            semanticScope.putDecoration(userRightNode, new TargetType(promotedType));
            decorateWithCast(userLeftNode, semanticScope);
            decorateWithCast(userRightNode, semanticScope);
        }
        semanticScope.putDecoration(userCompNode, new ValueType(boolean.class));
        semanticScope.putDecoration(userCompNode, new ComparisonType(promotedType));