## Lesson — Using String() casting on input patterns can lead to silent

**Tags:** typescript, error-handling, validation

Using `String()` casting on input patterns can lead to silent failures by turning unexpected objects into `"[object Object]"` strings. Explicitly validating types and throwing descriptive errors ensures that logic errors are caught during compilation rather than producing invalid rule outputs.
