In Self you can just use the == operator,
"hello" == "hello";"hello" !="goodbye";var word = "hello";if (word == "hello") { ...
For the star variable is patterns use toString() first.
if (star.toString() == "hello") { ...