`expected` should be casted to string for safety and I think that the comparison should be case sensitive, to be consistent with `containsText` and `valueContains`.