Your error's occurring due to something like this:
>>> None + "hello world"
>>>
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Python's None object is roughly equivalent to null, nil, etc. in other languages.