How to check a string existing in a list of strings

Hi,

I have a code like below where I am getting a list of text strings into a local!leadIDs. When I try to use contains() function to check whether a specified string exists, then I am getting an error like 

Expression evaluation error at function 'contains' [line 11]: Invalid types, can only act on data of the same type (Any Type, Text)

Can someone advise, how to fix this.

a!localVariables(
local!leadIDs: index( rule!getLeads(key: null()), "id", null()),
contains(local!leadIDs, "AB12345")
)

Expression evaluation error at function 'contains' [line 11]: Invalid types, can only act on data of the same type (Any Type, Text)

  Discussion posts and replies are publicly visible