[#2212] CID43793:

Moved null check to be more all-encompassing