Added code to check the conditions of a class.