Remarks on energy inequalities for wave and Maxwell equations on a curved background