fix SMS api issue

test_sms.py is failing with ```cursor is undefined```  if there is no SMS messages sent or received.

Basically if the we run the test on a fresh build there is no sms data and https://github.com/mozilla/gaia-ui-tests/blob/master/gaiatest/atoms/gaia_data_layer.js#L364 is null

We have to check this issue and make sure we treat the exception