this checks if parameter is an element and the takes the style from it