Both are noun clauses introduced by "that". In the first sentence, the clause is an object (of the verb "check"). In the second sentence, the clause is a complement of a noun ("extent").
When a noun clause is an object, "that" is omissible.
When a noun clause is a complement of a noun, it is somewhat a grey area. On omitting "that" in general, The Cambridge Grammar of the English Language (p. 953-954) say:
The default case is the one where that is present as a marker of the subordinate status of the clause. Departures from this default case, declaratives without that, are more likely in informal than in formal style. For the rest, the relative likelihood of dropping the that depends largely on the structure of the matrix clause but also on that of the content clause itself.
They list the following example as "favouring the retention" of "that":
"I didn't like his insinuation [that we had initiated the complaint]."
and say
In [the above example] it is complement to a noun; omission is not impossible in this construction, but it is unlikely with a morphologically complex noun like "insinuation" (compare "The fact [it was illegal] didn't seem to worry him", with the simple noun "fact" as head).
They do not explain why (morphological) complexity favours the retention of "that", but using their logic, I would argue that the phrase "to the extent that" is (syntactically and semantically) complex and therefore dictates the retention of "that", at least formally.