I think it is better to not iterate every single array looking for entities. If the data is inconsistent it is better to just stop, imo.