RFR: 8297877: jfr functions should check JavaValue result before use