First test that $lastjudge is non-empty and do integer comparison
separately to prevent shell warnings.