Added more defensive way of checking the @attributes in Item#respond_to?

Closes #944