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
semanticScope.putDecoration(userNewArrayFunctionRefNode, new ValueType(valueType));
    }
    /**
     * Visits a symbol expression which covers static types, partial canonical types,
     * and variables.
     * Checks: type checking, type resolution, variable resolution
     */
    @Override
    public void visitSymbol(ESymbol userSymbolNode, SemanticScope semanticScope) {
        boolean read = semanticScope.getCondition(userSymbolNode, Read.class);
        boolean write = semanticScope.getCondition(userSymbolNode, Write.class);
        String symbol = userSymbolNode.getSymbol();
        Class<?> staticType = semanticScope.getScriptScope().getPainlessLookup().canonicalTypeNameToType(symbol);
        if (staticType != null) {
            if (write) {
                throw userSymbolNode.createError(
                    new IllegalArgumentException(
                        "invalid assignment: "
                            + "cannot write a value to a static type ["
                            + PainlessLookupUtility.typeToCanonicalTypeName(staticType)
                            + "]"
                    )
                );
            }
            if (read == false) {
                throw userSymbolNode.createError(
                    new IllegalArgumentException(
                        "not a statement: " + "static type [" + PainlessLookupUtility.typeToCanonicalTypeName(staticType) + "] not used"
                    )
                );