Check to see if 'cb' exists in 'close()' before calling it