Suppose I want to check the fill-opacity of a SVG element. I'd do this
elem.attr('fill-opacity');
This can give me back 0 if the element has no fill-opacity attribute or if the fill-opacity has been set to 0.
How do I distinguish between those two cases?