(1)(a) Except as provided in paragraph (b), the judge presiding at the trial of an action is not competent to testify as a witness in that trial. An objection is not necessary to preserve the point.
(b) By agreement of the parties, the trial judge may give evidence on a purely formal matter to facilitate the trial of the action.
(2)(a) A member of the jury is not competent to testify as a witness in a trial when he or she is sitting as a juror. If the juror is called to testify, the opposing party shall be given an opportunity to object out of the presence of the jury.
(b) Upon an inquiry into the validity of a verdict or indictment, a juror is not competent to testify as to any matter which essentially inheres in the verdict or indictment.