diff --git a/lib/salesforce_bulk_api/connection.rb b/lib/salesforce_bulk_api/connection.rb
index <HASH>..<HASH> 100644
--- a/lib/salesforce_bulk_api/connection.rb
+++ b/lib/salesforce_bulk_api/connection.rb
@@ -75,7 +75,7 @@ require 'timeout'
 
     def parse_instance()
       @instance=@server_url.match(/https:\/\/[a-z]{2}[0-9]{1,2}/).to_s.gsub("https://","")
-      @instance = @server_url.split(".salesforce.com")[0].split("://")[1] if @instance.blank?
+      @instance = @server_url.split(".salesforce.com")[0].split("://")[1] if @instance.nil? || @instance.empty?
       return @instance
     end
remove blank? usage
since activesupport is not a dependency