Optimisation : change checkTitleLength to checkStringLength to re-use it.