Add resource if change is not None else ChangeTypeError.

def add_if_changed(self, resource):
        """Add resource if change is not None else ChangeTypeError."""
        if (resource.change is not None):
            self.resources.append(resource)
        else:
            raise ChangeTypeError(resource.change)