Zod

Typescript

https://zod.dev/

Zod is a TypeScript-first schema declaration and validation library.

Zod is designed to be as developer-friendly as possible. The goal is to eliminate duplicative type declarations. With Zod, you declare a validator once and Zod will automatically infer the static TypeScript type. It's easy to compose simpler types into complex data structures.

Zod Nullables

Zod Nullables are a useful utility to append to Sanity Schema fields.

GROQ will return the field if it has data or null.