Error for no scrap Data

I am using screen scrap but when in some cases if data is not available there, it is giving error of empty selection. Please suggest how to fix this issue.

for e.g.
in one case we have
Name : XYZ
which is captured but when in another case if we have like(no value):
Name :
Ui throwing and error of empy text selected.

Please suggest!