Added type retrieval to style helper