Added more validation for setting goals.