Whenever in the course of any civil or criminal proceeding in any court of justice a person is tendered as a witness, and it is found to be impracticable, at the time and place when and where the person is so tendered, to administer to the person an oath in the form and manner required by the person’s religion to make it binding on the person’s conscience, it shall be the duty of the presiding judge, if satisfied of the fact, to require such person to make a solemn affirmation in the form of the schedule, and upon such person making such solemn affirmation the person’s evidence shall be taken, and the evidence so taken shall be as valid as if an oath had been administered in the ordinary manner.