diff --git a/lib/feed2email/cli.rb b/lib/feed2email/cli.rb
index <HASH>..<HASH> 100644
--- a/lib/feed2email/cli.rb
+++ b/lib/feed2email/cli.rb
@@ -40,7 +40,7 @@ module Feed2Email
 
     desc 'history FEED', 'edit history file of feed at index FEED with $EDITOR'
     def history(index)
-      if ENV['EDITOR'].nil?
+      if ENV['EDITOR'].blank?
         $stderr.puts '$EDITOR not set'
         exit 6
       end
diff --git a/lib/feed2email/core_ext.rb b/lib/feed2email/core_ext.rb
index <HASH>..<HASH> 100644
--- a/lib/feed2email/core_ext.rb
+++ b/lib/feed2email/core_ext.rb
@@ -9,6 +9,10 @@ class Numeric
 end
 
 class String
+  def blank?
+    nil? || empty?
+  end
+
   def escape_html
     CGI.escapeHTML(self)
   end
Check for empty $EDITOR in history command