After upgrading to Sitecore 9 and converting custom index files from using Lucene to Solr, I am getting the following error on an Ajax call: 
`Unable to cast object of type 'System.Collections.ArrayList' to type 'System.String'`.

```

[InvalidCastException: Unable to cast object of type 'System.Collections.ArrayList' to type 'System.String'.]
   Sitecore.ContentSearch.Converters.IndexFieldIDValueConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) +38
   Sitecore.ContentSearch.Converters.IndexFieldStorageValueFormatter.ReadFromIndexStorage(Object indexValue, String fieldName, Type destinationType) +197

[InvalidCastException: Could not convert value of type System.Collections.ArrayList to destination type Sitecore.Data.ID: Unable to cast object of type 'System.Collections.ArrayList' to type 'System.String'.]
   Sitecore.ContentSearch.Converters.IndexFieldStorageValueFormatter.ReadFromIndexStorage(Object indexValue, String fieldName, Type destinationType) +801
   Sitecore.ContentSearch.DocumentTypeMapInfo.SetProperty(Object target, String propertyName, String documentFieldName, Object value) +802

```

[![screenshot of error](https://i.stack.imgur.com/hASEK.png)](https://i.stack.imgur.com/hASEK.png)

I have tried an explicit cast and adding `multiValued="false"` in the config file for some of the fields but I am unsure what is causing the error.