I was told that the Gemara states, “If man safeguards the purity of his soul by walking in the ways of the Torah, all will be well, but if not God will take his soul from him". Does the Gemara actually say such a statement? And if so, what does it mean?