null check on cancel