Fixed js bug on Files and Images tree

Call observeMethod only if ($(_HANDLER_FORMS.addpage).elements.PageType) exist to prevent javascript error on File & Images page.

See https://github.com/silverstripe/silverstripe-cms/commit/f4b7fe05fa62c116e10336fa6309491386632c61