diff --git a/lib/sitemap.rb b/lib/sitemap.rb
index <HASH>..<HASH> 100644
--- a/lib/sitemap.rb
+++ b/lib/sitemap.rb
@@ -160,7 +160,7 @@ module Sitemap
     private
 
     def get_data(object, data)
-      data.respond_to?(:call) ? data.call(object) : data
+      data.is_a?(Proc) ? data.call(object) : data
     end
 
   end
Using a more reliable way of determining if received data is a block.