Implement a function to determine if a number is a happy number.
A happy number is defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1.
If the number equals 1, it is a happy number, otherwise, it is an unhappy number.