add method to check if class has been loaded, with option param of checking if that class has dependencies