mobile.getAttribut: add tests to prevent errors
Page: fix usage of $.mobile.getAttribute in checking if page is a dialog