fixed nil class error buy by adding if statement
Merge pull request #235 from rwarbelow/fix_sms_method_bug

fixed nil class error buy by adding if statement