Moved check that ensures Class is of type FDModel to its correct place.