// TODO: better error message when neither field nor method found sO preciseGetOrCallMethod(O object, S name) { if (object == null) null; // could optimize more for sure if (canCallWithVarargs(object, name)) ret call(object, name); // TODO: better error message when neither field nor method found ret _get(object, name); }