## Lesson — 2026-03-07T06:05:56.069Z

**Tags:** security, curated
**Pattern:** typeof\s+[^\s!&|=]+\s*===\s*['"]object['"](?!\s*&&)
**Engine:** regex
**Scope:** **/*.ts, **/*.tsx, **/*.js, **/*.jsx, !**/*.test.ts
**Severity:** error

Always combine typeof val === "object" with a truthiness check because typeof null is "object".
