How can we check if PlistElementArray contains a certain string value?

I am doing some plist post processing in Unity for Xcode and I want to avoid adding duplicate elements to a PlistElementArray.

Contains and IndexOf do not work since they require a PlistElement. I also tried

if (elementArray["blah"] == null) {
  elementArray.addString("blah")
}

But got: Error building Player: InvalidCastException: Cannot cast from source type to destination type.

The simplest solution would be to iterate over the whole array and check for a string, if that string is found then you skip, otherwise you add to the array.