Beam quality measurement of laser pulses by nonlinear optical techniques