Fix exception when element has no web frame.