add if for empty object on main page