diff --git a/lib/natural/classifiers/classifier.js b/lib/natural/classifiers/classifier.js
index <HASH>..<HASH> 100644
--- a/lib/natural/classifiers/classifier.js
+++ b/lib/natural/classifiers/classifier.js
@@ -34,6 +34,15 @@ var Classifier = function(classifier, stemmer) {
 };
 
 function addDocument(text, classification) {
+    
+    // Ignore further processing if classification is undefined 
+    if(typeof classification === 'undefined') return;
+    
+    // If classification is type of string then make sure it's dosen't have blank space at both end  
+    if(typeof classification === 'sytring'){
+      classification = classification.trim();
+    }
+  
     if(typeof text === 'string')
 	text = this.stemmer.tokenizeAndStem(text);
Checked for undefined and blank spaces in label  

Added check for undefined and blank spaces at in string (beginning and end) in classification label