[html] Change instanceof operator to typeof test, since instanceof