OBJECT.is_a?(CLASS)
will return true if CLASS is the class or a superclass of OBJECT. Other than that you can try to do it like me. Instead of using arrays or Hash I make a method to return values corresponding to item IDs or something else. Just check out the "database" of one of my scripts like the SRS. BTW, you can check any object's ID by using OBJECT.id (like weapons, armors, actors, enemies, etc.)