Rely on === for case statements

This makes sure that subclasses are handled properly
Merge pull request #26 from Shopify/match_subclasses_when_encoding_data

Match subclasses when encoding data