# ask_user_answer_is_empty

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/_ask_user_types/ask_user_answer_is_empty)

Return whether an `ask_user` answer counts as "no answer".

The single definition of emptiness for an answer, shared by the TUI (which
blocks submitting a required question) and by the Auto authorization path
(which keeps unanswered questions out of the consent evidence). Both sides
must agree: an answer the TUI accepts as empty must not read as consent
evidence downstream.

A bare `.strip()` is wrong for `multi_select`, whose empty encoding is the
truthy string `[]`. Every other type is empty when it is blank.

## Signature

```python
ask_user_answer_is_empty(
    answer: str,
    question_type: object,
) -> bool
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `answer` | `str` | Yes | The raw answer string for the question. |
| `question_type` | `object` | Yes | The paired question's `type`. Anything other than `'multi_select'` — including a malformed or missing type — takes the blank test. |

## Returns

`bool`

`True` when the question has no substantive answer.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/2069079e09546060f5b52b2cd4f0e3c813e820f3/libs/code/deepagents_code/_ask_user_types.py#L121)