factor out check for self-checks