Added check to prevent the rendering of empty content