# Truthy and falsy

> Which Liquid values are truthy and which are falsy in Shoplazza themes, and why an empty string or an EmptyDrop still needs a blank or empty check.

All data types must return either `true` or `false`. Those which return `true` by default are called truthy. Those that return `false` by default are called falsy.

| Value        | Truthy | Falsy |
| :----------- | :----- | :---- |
| `true`       | ✔      |       |
| `false`      |        | ✔     |
| `nil`        |        | ✔     |
| empty string | ✔      |       |
| `0`          | ✔      |       |
| integer      | ✔      |       |
| float        | ✔      |       |
| array        | ✔      |       |
| empty array  | ✔      |       |
| page         | ✔      |       |
| empty object | ✔      |       |

## Example

Because `nil` and `false` are the only falsy values, you need to be careful how you check values in Liquid. A value might not be in the format you expect, but still be truthy.

For example, empty strings are truthy, so you need to check whether they're empty with `blank`. `EmptyDrop` objects are also truthy, so you need to check whether the object you're referencing is `empty`.

```liquid title="Code"
{% if settings.heading_font_family != blank %}
  {{ settings.heading_font_family }}
{% else %}
  No value for this setting has been selected.
{% endif %}

{% assign recipes_page_id = '3366359' %}
{% unless pages[recipes_page_id] == empty %}
  {{ page[recipes_page_id].content }}
{% else %}
  No page with this handle exists.
{% endunless %}
```
```json title="Data"
{
  "settings": {
    "heading_font_family": null
  }
}
```

```html title="Output"
No value for this setting has been selected.
No page with this handle exists.
```
