Added else condition to avoid blank titles.