the first argument of updatePagePadding is expected to be a page, but when it is called from the throttledResize binding, it ends up as an event object, and the padding was being set on that instead of the page. This adds a check to ensure the arg is a page before setting its padding. This is a fix for #5619 (cherry-picking from commit 493229c33059bf39e032a217dfb4adf72fc4127d)