NEXUS-6282: Added nullcheck.

Nullcheck added.

Issue
https://issues.sonatype.org/browse/NEXUS-6282

CI
TBD