TRQ--1734 Not checking for NULLs causing a crash.