fixed AttributeError: 'NoneType'

fixed AttributeError: 'NoneType' object has no attribute 'body' if the text was empty.