only estimate gradients when necessary in npreg :)