Added nil check for home index action