Hello, thanks for your replies.
I am not a regular / experience SolidWorks user.
I spent some time on my problem and realized that I had unnecessarily tried to generalize the problem.
Here is more specific problem.
The sheet view can contain annotations or even geometry. So I wanted to check if the sheet view had any of such objects.
The RootDrawingComponent represents the model connected to view, hence it will always be nothing for sheet or Custom view even if they contain objects.