adding extra check to ensure a view doesnt get rendered if its destroyed