toTitleCase and empty string handling.