# Cannot string compare in custom module

**URL:** <https://community.hubspot.com/t/cannot-string-compare-in-custom-module/140043>\
**Category:** CMS Development\
**Created:** [September 24, 2025, 10:51pm UTC](https://community.hubspot.com/t/cannot-string-compare-in-custom-module/140043 "2025-09-24T22:51:43Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![darveesh](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@darveesh](https://community.hubspot.com/u/darveesh)\
**Post date:** [October 3, 2025, 3:51pm UTC](https://community.hubspot.com/t/cannot-string-compare-in-custom-module/140043/19 "2025-10-03T15:51:45Z")

</div>

Another approach without filters. The temp variable get set to “none” but the compare for it fails. Is that normal programming behavior?

```lia-code-sample
{% set salutation = personalization_token('contact.salutation', 'none') %}
Salutation is: [{{salutation}}]<br/>
{% if salutation == "none" %}
{% else %}
Hi {{ contact.salutation }} {{ contact.lastname }} ,
{% endif %}

```

The saluation variable outputs none, but the compare fails and goes into the statment. Example output for a contact without a salutation:

Salutation is: [none]  
Hi Ryan ,

---

_[View the full topic](https://community.hubspot.com/t/cannot-string-compare-in-custom-module/140043)._
