Added required toTitleCase function and fix coltype detection error