Dynamically add Legend only if there is a GeoJSON layer