Changed to check if input numeric.