check class if it is a abstract class then dont new it