Can you think of a reason not to short-circuit most of this with an is_a? check? It seems like if they're not Dynamoid::Documents, they  can't be equal. Then you can reduce some of the respond_to? checking logic.