Whenever an oath shall be required by any law of this state in any proceeding, an affirmation may be substituted therefor.