checkPolygon now also checks if the polygon has at least 3 points.