Slightly optimized .upper and .lower usage.