Check if the returned framework is not null before adding to the hash set.