Fix get geometry type by constraint