Consider implementing whatwg/html#2939
Experimenting with https://checker.html5.org/parsetree/?parser=html5&content=<!%00>&submit=Print+Tree it seems currently the U+0000 check is in the preprocessing step, and not in the tokenizer. In the spec it was removed from the preprocessing since it needs different handling in the tokenizer/tree builder for different contexts, IIRC. But with the latest spec change it ought to be equivalent in terms of how many errors are produced for a given input, the difference could be relative order of errors.
Anyway I thought I'd file this as a heads-up at least.