# Conditional Filters
## default
Returns default value if null or empty.
```html
{{ null_value | default(value="fallback") }}
{# Output: fallback #}
```
## when
Ternary conditional.
```html
{{ is_active | when(then="yes", else="no") }}
{# If is_active = true, output: yes #}
{# If is_active = false, output: no #}
```
## coalesce
Returns first non-null value.
```html
{{ null_value | coalesce(other=fallback) }}
{# Output: fallback #}
```
## defined
Checks if variable is defined.
```html
{% if my_var | defined %}
Variable is defined
{% endif %}
```
## undefined
Checks if variable is undefined.
```html
{% if my_var | undefined %}
Variable is not defined
{% endif %}
```
## empty
Checks if value is empty.
```html
```
## not_empty
Checks if value is not empty.
```html
```