ensuring strings to prevent NoneType concatenation errors