There IS some law regarding the admissibility of witness statements that are deemed a "dying declaration", in spite of the hearsay rule, but that's a different issue.
The reason I said that in my comment is that some state laws are written to permit handwritten wills (holographic wills) so that people facing imminent death have a quick option in case they can’t get to a lawyer, witness, or typewriter.