public static Object extractTypeChecked(List<Object> args,int i,Class clazz,Function<List<Object>,Object> extractFunc){
  if (args.size() < i + 1) {
    return null;
  }
 else   if (clazz.isInstance(args.get(i))) {
    return extractFunc.apply(args);
  }
 else {
    return null;
  }
}

public static Object extractTypeChecked ( List < Object > args , int i , Class clazz , Function < List < Object > , Object > extractFunc ) { if ( args . size ( ) < i + 1 ) { return null ; } else if ( clazz . isInstance ( args . get ( i ) ) ) { return extractFunc . apply ( args ) ; } else { return null ; } }
extract type - checked value from an argument list using the specified type check and extraction function
