CORE-1669: Returning the defaultCatalogName if it is not null.

Fix for Jira issue CORE-1669