runtime validation + types is an amazing thing to have in your arsenal.
I personally use io-ts by
@GiulioCanti, which allows both encoding and decoding, and sharing common "types" (io-ts-types) between apps, like `DateFromISOString` which takes a stringified date and validate it