Gracefully handle view returning None for window()