Exception thrown while querying GroupShare API for project details

I've now found several GroupShare-based projects where the GroupShare API returns a 500 (Internal Server Error) response containing "An error has occurred."

The API method being called is /api/projectserver/v2/projects (GET)

At a guess I'd say that this has happened for approximately 1 in 10 projects. We mainly use GroupShareKit when consuming the API but GroupShareKit frequently doesn't bubble up the exception messages so for a clearer picture of the error I then tried calling the GroupShare REST API directly (using Postman) and it's from here that I receive the message "An error has occurred." (I think GroupShareKit threw an exception with the message "An API error occurred" or something similar.)

The project and its details are visible in the GroupShare web UI and in Trados, the problem only occurs when I ask for the details via the API.

I've found that the log file at C:\ProgramData\SDL\Service\Logs\Sdl.Application.log contains the following message each time this happens:

2018-07-23 13:34:22.167#Rest Api#GET groupshare.supertext.com:41234/.../aea5347e-eb18-4781-bb80-d13dc08ecf4c 2018-07-23 13:34:22.261#Rest Api#An unexpected error occurred: System.InvalidOperationException: An exception occured while reading a database value for property 'AnalysisStatisticsPerProject.ExactMatchedCharacters'. The expected type was 'System.Int32' but the actual value was null. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.EntityFrameworkCore.Metadata.Internal.EntityMaterializerSource.TryReadValue[TValue](ValueBuffer valueBuffer, Int32 index, IPropertyBase property) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Metadata.Internal.EntityMaterializerSource.ThrowReadValueException[TValue](Exception exception, Object value, IPropertyBase property) at Microsoft.EntityFrameworkCore.Metadata.Internal.EntityMaterializerSource.TryReadValue[TValue](ValueBuffer valueBuffer, Int32 index, IPropertyBase property) at lambda_method(Closure , ValueBuffer ) at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.UnbufferedEntityShaper`1.Shape(QueryContext queryContext, ValueBuffer valueBuffer) at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__3`1.MoveNext() at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.<_TrackEntities>d__15`2.MoveNext() at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at Sdl.ProjectServer.Data.Services.StatisticsService.GetAnalysisStatisticsOnProjectLevel(Guid projectId) at Sdl.StudioServer.Services.ProjectServer.RestApi.Adapter.Adapters.ProjectStatisticsAdapter.GetStatisticsOnProjectLevel(Guid projectId) at Sdl.StudioServer.Services.ProjectServer.RestApi.Controllers.V2.ProjectsV2Controller.Get(Guid id) at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.<>c__DisplayClass5.<ExecuteAsync>b__4() at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)

Might this exception be caused by something that we've done? Is there anything we can do to prevent this fro happening? Is this a known error?