class NullCollectionSerialize implements JsonSerializer<Collection> {
    @Override
    public JsonElement serialize(Collection collection, Type type, JsonSerializationContext jsonSerializationContext) {<FILL_FUNCTION_BODY>}
}

        if (collection == null) {
            return new JsonArray();
        }

        return jsonSerializationContext.serialize(collection, type);
    
<no_super_class>