In any matter in which a document or other writing is to be submitted under penalty of false statement, the affiant may, in lieu thereof, swear to the truth of the document or writing before any proper officer.