Check if iframe actually exists in dom before writing to it.