text: Fix checking NULL after dereferencing
text: Fix checking NULL after dereferencing

This was detected by static analysis tool.

Change-Id: I4a4566b5537e905c61cc16e38e54fe7d15fdae17

dalihub/dali-toolkit,dalihub/dali-toolkit,dalihub/dali-toolkit,dalihub/dali-toolkit