Use chars instead of split
Move nil check to joining