Simplify call to getValue when called with 2 parameters

If func_num_args() is 2 then we can avoid call_user_func_array
and call $av->getValue() directly (that's faster)