Checking if entier view has been unset

When the View was unset this line would throw: cannot read property
'length' of undefined