improved exception handling for happiness inputs