add null checks for build.getResult() to address new findbugs warnings