Optimize lowercase character tests