Guard against view being null.