Add more sanity checks

With certain colorschemes, setting highlight attributes gave errors.