Refactor GPG key checks