sorry, it's my fault here, I should have thought of this before.

The correct way to do this is:

```javascript
var sender = message.sender;
if (contact && contact.length) {
  var details = Utils.getContactDetails(message.sender, contact[0]);
  sender = details.title || sender;
}
```