Polygon checking