If any person tendered for the purpose of giving evidence in respect of any civil or criminal proceeding before a court of justice, or any officer thereof, or on any commission issued out of the court, objects to take an oath, or by reason of any defect of religious knowledge or belief or other cause, appears incapable of comprehending the nature of an oath, it shall be the duty of the judge or person authorised to administer the oath, if satisfied that the taking of an oath would have no binding effect on the conscience of such person and that the person understands that he or she will be liable to punishment if the evidence is untruthful, to declare in what manner the evidence of such person shall be taken, and such evidence so taken in such manner as aforesaid shall be valid as if an oath had been administered in the ordinary manner.