Encode an sf object as GeoJSON for a JSON response, NULL-safe
Source:R/serializers.R
aurora_geojson.RdReturns an unboxed GeoJSON string for an sf object, or NULL if the
input is NULL or not an sf object (so an absent layer serializes as JSON
null, not [] or an error).