ENG-5554, Optimize null checking from Paul 

Waiting for Jenkins.