[FIXED JENKINS-26076] - Add null checks and proper annotations

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>