CONN-1437: Fixed possible null dereferences
Merge pull request #947 from christophermay07/CONN-1437

CONN-1437