diff --git a/vars/email_notify.groovy b/vars/email_notify.groovy
index 79c0144c469d8ffa80c3800e688b5ef69496a8fe..b816d471bf0572b4f9830a60e69000ed1655bf14 100644
--- a/vars/email_notify.groovy
+++ b/vars/email_notify.groovy
@@ -8,7 +8,7 @@ def call(String email_list = "") {
             String ANSI_YELLOW = "\u001B[33m"
 
            println "Hello" + email_list
-           if(email_list != ""){
+           if(email_list.length() > 0){
                     emailext body: '''$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS: Check console output at $BUILD_URL to view the results.''', subject: '$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!', to: email_group
                     return
            }