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
Class<?> childValueType = semanticScope.getDecoration(userChildNode, ValueType.class).valueType();
                unaryType = AnalyzerCaster.promoteNumeric(childValueType, operation != Operation.BWNOT);
                if (unaryType == null) {
                    throw userUnaryNode.createError(
                        new ClassCastException(
                            "cannot apply the "
                                + operation.name
                                + " operator "
                                + "["
                                + operation.symbol
                                + "] to the type "
                                + "["
                                + PainlessLookupUtility.typeToCanonicalTypeName(childValueType)
                                + "]"
                        )
                    );
                }
                semanticScope.putDecoration(userChildNode, new TargetType(unaryType));
                decorateWithCast(userChildNode, semanticScope);
                TargetType targetType = semanticScope.getDecoration(userUnaryNode, TargetType.class);
                if (unaryType == def.class && targetType != null) {
                    valueType = targetType.targetType();
                } else {
                    valueType = unaryType;
                }
            } else {
                throw userUnaryNode.createError(new IllegalStateException("unexpected unary operation [" + operation.name + "]"));
            }
        }
        semanticScope.putDecoration(userUnaryNode, new ValueType(valueType));