# Non-Null Assertion Without Null Check - ID: typescript-non-null-assertion - Severity: LOW - CWE: CWE-476 (CWE-476) - Languages: TypeScript - Frameworks: express, fastify, nestjs, next ## Description The non-null assertion operator (!) bypasses null/undefined checks at compile time without runtime safety, causing crashes when values are unexpectedly null. ## Detection Message Non-null assertion (!), used on '{expression}' without explicit null/undefined check. This may cause runtime crashes if the value is null/undefined. ## Remediation Use explicit null checks or optional chaining instead of non-null assertions. ```typescript function getUserEmail(userId: string) { const user = users.find(u => u.id === userId); if (!user) { throw new Error('User not found'); } return user.email; } ``` Learn more: https://shoulder.dev/learn/typescript/cwe-476/non-null-assertion ## Documentation [object Object] ## Related Rules - **Unsafe Type Assertion Without Ok Check** [MEDIUM]: