Gradient better valid check