Checks if an array contains only primitives
bool isArrayOfPrimitives(List<Object?> value) { return value.every(isJsonPrimitive); }