Improve handling of adding of static context, simplify checkArgument and checkState handling to use non-surrounder format