Added more nullchecks and also better sensing of pages with no correct language context.