check_curve function

Checks a curve and decides for its convexity type