On the Detection and Quantification of Nonlinearity via Statistics of the Gradients of a Black-Box Model