Implement isRectangle (#154, #156)