}
public static <T extends ModelValue> T get(ModelObject modelObject, Class<T> type, String...names) {
Model model = modelObject.get(names);
try {
return model.asValue(type);
} catch (IllegalArgumentException e) {
ModelValue.ModelValueType expected;
if (type == ModelString.class) {
expected = ModelValue.ModelValueType.STRING;
} else if (type == ModelNumber.class) {