Function to check if a number has digits
Function to check if a number has digits