Hi Abdelrahman,
Please take the time to read the following post How to get help on the Dynamo forums
There are many instances of this problem being solved on the forum
Firstly use a Vector.Z node to get the numerical value rather than convert to string, then use approximate equals ‘==’ node (two wavy lines icon) to match to -1