validating for deleting in the right way