check if sms is undefined