Put null check before using the value that could potentially be null. This fixes the 15 failing tests.

Signed-off-by: Tushar Narayan <tusharnarayan@gmail.com>
Merge remote-tracking branch 'origin/team1-dev' into team1-dev