refs #18288, fix dom-attr return of non boolean when attr doesn't exist

(cherry picked from commit b863f44dd53ec21d0a8084494a36c4fd2f871d63)