diff --git a/lib/helpers.js b/lib/helpers.js
index <HASH>..<HASH> 100644
--- a/lib/helpers.js
+++ b/lib/helpers.js
@@ -6,6 +6,10 @@ var parser = require('./parser'),
 
 // Returns TRUE if the passed string is a valid javascript string literal
 exports.isStringLiteral = function (string) {
+    if (typeof string !== 'string') {
+        return false;
+    }
+
     var first = string.substring(0, 1),
         last = string.charAt(string.length - 1, 1),
         teststr;
check if the input is actually a string before checking if it's a string literal