As the code itself hints, there's no reason to assume the imported attribute is a class.