Added check to see if link element exists before trying to swap css file...

...s to prevent errors with updating css files not included in html