DynamoDB Document/Item (Un)Marshaler

Added a Marshaler helper object to the DynamoDB namespace that can handle maps and lists.
I wonder if switching off of gettype() would be faster here?