http/schema_helpers.ts view source
(schema: ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>): boolean Check if a schema is exactly z.null().
Uses Zod 4 type introspection (_zod.def.type) rather than runtime parsing
to avoid false positives from z.nullable(z.string()) or similar schemas
that accept null but also accept other values.
schema
ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>returns
boolean