Added checkDig method to CommonLibrary.