function validPolygon(polygon) {
  return Array.isArray(polygon)
    && polygon.every((point) => Array.isArray(point)
      && point.length === 2
      && !Number.isNaN(point[0])
      && !Number.isNaN(point[1]));
}
Checks the validity of a polygon.
@param {KUTE.polygonMorph} polygon the target polygon
@returns {boolean} the result of the check