diff --git a/lib/adminable/resource.rb b/lib/adminable/resource.rb
index <HASH>..<HASH> 100644
--- a/lib/adminable/resource.rb
+++ b/lib/adminable/resource.rb
@@ -28,7 +28,7 @@ module Adminable
     end
 
     def ==(other)
-      name == other.name
+      other.is_a?(Adminable::Resource) && name == other.name
     end
   end
 end
Add check for class for resource == method