When a variable is assigned an `undefined` or `null` value, it has no properties. Trying to access properties of such a variable anyway results in a `TypeError`, causing abrupt termination of the script if the error is not caught in a `catch` block. But instead of `catch`-ing this condition, it is best to avoid it altogether.

## Noncompliant Code Example

    if (x === undefined) {
      console.log(x.length); // Noncompliant; TypeError will be thrown
    }

## See

- MITRE, CWE-476 - NULL Pointer Dereference
- CERT, EXP34-C. - Do not dereference null pointers
- CERT, EXP01-J. - Do not use a null in a case where an object is required
- OWASP Top Ten 2013 Category A1 - Injection
- OWASP Top Ten 2013 Category A2 - Broken Authentication and Session Management
- OWASP Top Ten 2013 Category A6 - Sensitive Data Exposure