[CA-115256] Add null check as suggested by code review