Preventing index view trying to render nil object