checkout: Fix previous commit

Don't try to close in cases where we don't have input.