here I think you want to just get rid of the mystr bit right above and make the check "if e_email.present?" which will check that e_email is both non-nil and not the empty string.