add some checks to Gaussian() and Beta() for invalid inputs