[canvas] Use isAttachedToHost() instead of null check in TextElement