More robust handling of arrays that may be parsed as strings