Move the check for css to be loaded out of a string into code