Updated hexToDec.coffee to detect valid input