Checking if tickets are closed before you attempt to close them