Adopt is/toHTMLImageElement for code cleanup