Fixed getInlineStyle and appendStyle to accommodate elements with no style set.