Adding else condition in home.html so that code doesn't break if records don't exist in mongodb