Fixing the type checking of numeral and literal expressions