ShellModel: correctly check if window is the main window - #4602

In commit 58fa64 we forgot the case when home_activity is None.
home_activity will be None at least for the Journal.

Also, explicitly check for None as per PEP8.

This fixes the Journal icon in the frame that was pulsing all the
time.