Argument validation for centroid