How do you know the `val` here can be cast to `string[]`?