check if classname exists before instantiating (prevents interfaces from being instantiated)
@kishan fixed bug that caused interfaces being instantiated and throwing errors
@kishan fixed bug that caused interfaces being instantiated and throwing errors