Create reusable cancel button check