Check CPcurve is non-null before hide/show