add condition checking for sms send

check if datavalue is nil before use it