Properly handle a null URI.

Change-Id: Ic144986f6935e9a2df0073869a6a8b4e863a6128
JIRA:CYAN-2491