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
if (constructor == null) {
            throw userNewObjNode.createError(
                new IllegalArgumentException(
                    "constructor [" + typeToCanonicalTypeName(valueType) + ", <init>/" + userArgumentsSize + "] not found"
                )
            );
        }
        scriptScope.putDecoration(userNewObjNode, new StandardPainlessConstructor(constructor));
        scriptScope.markNonDeterministic(constructor.annotations().containsKey(NonDeterministicAnnotation.class));
        if (constructor.typeParameters().size() != userArgumentsSize) {
            throw userNewObjNode.createError(
                new IllegalArgumentException(
                    "When calling constructor on type ["
                        + PainlessLookupUtility.typeToCanonicalTypeName(valueType)
                        + "] "
                        + "expected ["
                        + constructor.typeParameters().size()
                        + "] arguments, but found ["
                        + userArgumentsSize
                        + "]."
                )
            );
        }
        for (int i = 0; i < userArgumentsSize; ++i) {
            AExpression userArgumentNode = userArgumentNodes.get(i);
            semanticScope.setCondition(userArgumentNode, Read.class);
            semanticScope.putDecoration(userArgumentNode, new TargetType(constructor.typeParameters().get(i)));
            semanticScope.setCondition(userArgumentNode, Internal.class);
            checkedVisit(userArgumentNode, semanticScope);
            decorateWithCast(userArgumentNode, semanticScope);