diff --git a/src/Autolinker.js b/src/Autolinker.js
index <HASH>..<HASH> 100644
--- a/src/Autolinker.js
+++ b/src/Autolinker.js
@@ -264,6 +264,8 @@ Autolinker.prototype = {
 	 * @return {String} The HTML, with matches automatically linked.
 	 */
 	link : function( textOrHtml ) {
+		if( !textOrHtml ) { return ""; }  // handle `null` and `undefined`
+
 		var htmlParser = this.getHtmlParser(),
 		    htmlNodes = htmlParser.parse( textOrHtml ),
 		    anchorTagStackCount = 0,  // used to only process text around anchor tags, and any inner text/html they may have
diff --git a/tests/AutolinkerSpec.js b/tests/AutolinkerSpec.js
index <HASH>..<HASH> 100644
--- a/tests/AutolinkerSpec.js
+++ b/tests/AutolinkerSpec.js
@@ -47,6 +47,15 @@ describe( "Autolinker", function() {
 		} );
 
 
+		it( 'should return an empty string when provided `undefined` as its argument', function() {
+			expect( autolinker.link( undefined ) ).toBe( '' );
+		} );
+
+		it( 'should return an empty string when provided `null` as its argument', function() {
+			expect( autolinker.link( null ) ).toBe( '' );
+		} );
+
+
 		describe( "URL linking", function() {
 
 			describe( "protocol-prefixed URLs (i.e. URLs starting with http:// or https://)", function() {
Handle `null` or `undefined` being passed to the link() method by returning empty string.