proper error handling for missing literals