diff --git a/mapper/object_mapper.py b/mapper/object_mapper.py index 381a524..2ad874a 100644 --- a/mapper/object_mapper.py +++ b/mapper/object_mapper.py @@ -101,10 +101,10 @@ def create_map(self, type_from, type_to, mapping=None): :return: None """ - if (type(type_from) is not type): + if (not isinstance(type_from, type)): raise ObjectMapperException("type_from must be a type") - if (type(type_to) is not type): + if (not isinstance(type_to, type)): raise ObjectMapperException("type_to must be a type") if (mapping is not None and not isinstance(mapping, dict)):