Adding a verification for Set.class too. Based on Garcia's suggestions.