Verify whether the page has any <math> element before doing the test and inserting the fallback