enforce list and dict types for certain attributes