added validation for close button, regarding discussion activity: