Treat object as a Hash to get attribute value

Models that use single-table inheritance will be cast as specific classes that don't always have the attribute defined as a method. Checking to see if the `object` responds like a Hash allows more flexibility to get raw column data. We raise an `ArgumentError` to indicate that the attribute may be invalid.