add condition check for the getBounds() of Polygon class