Test cleanup with null-check to make Travis happy (hopefully)