Fixed exception when the text is null