Quantitative isotope measurements in heterogeneous photocatalysis and electrocatalysis