[FIXED JENKINS-19973] - Added check for null build references

Fix prevents NPE for renamed projects.
BTW, fix is a just a workaround...

Signed-off-by: Oleg Nenashev <nenashev@synopsys.com>