private Object evalFunctionValue(Scope scope, FunctionValue fv, Object[] args) {
		final Object o = scope.getVariable(fv.getName(), true); //NULL is expected
		final int lineno = fv.getLine();
		if (o instanceof MixinDefinition) {
            throw error("Mixin not allowed, "+o, lineno);
        }
		if (o instanceof FunctionDefinition) {
            return evalDefinition(scope, (FunctionDefinition)o, args, lineno);
        }
		if (o != null) {
            return o != NULL ? o: null;
        }

		//check if it is a method provided by the resolver
		final String name = fv.getName();
		final Callable<Object> mtd = getMethod(name, args);
		if (mtd == null) {
			if (fv.isVariableLook())
             {
                return null; //consider as null
            }
			throw error("Function not found: "+name, lineno);
		}
		try {
			return mtd.call();
		} catch (Exception ex) {
			throw error("Unable to invoke "+mtd, lineno, ex);
		}
	}