Cater for gu_home_db being NULL or ''

Change-Id: I6d692ba984ff44e000613ed2839b801ace4ebed0