fix issue where an error while trying to throw and error happens when trying to extract a class name from a list type.