Improved handling of literal types