try catch for JSON.parse
actually this should not be here
Merge pull request #384 from Wikia/Dont-assume-that-json-is-valid

try catch for JSON.parse in MediaWiki.ts