Also: this would fail on unknown types anyway. Is the check for `Type::hasType` necessary?