public static function guardAgainstInvalidAlpha2($alpha2)
    {
        if (!is_string($alpha2)) {
            throw new InvalidArgumentException(
                sprintf('Expected $alpha2 to be of type string, got: %s', gettype($alpha2))
            );
        }

        if (!preg_match('/^[a-zA-Z]{2}$/', $alpha2)) {
            throw new DomainException(
                sprintf('Not a valid alpha2 key: %s', $alpha2)
            );
        }
    }