src/vs/workbench/api/common/extHostConfiguration.ts/isResourceLanguage
function isResourceLanguage(thing: any): thing is { uri: URI; languageId: string } {
	return thing
		&& thing.uri instanceof URI
		&& (thing.languageId && typeof thing.languageId === 'string');
}