check for class existence only when instance is not given