Unify SkipWhiteSpace()/ReadBOM() calls, add asserts

`SkipWhiteSpace()`/`ReadBOM()` cannot be passed null pointers and cannot return null pointers. Calling code was sometimes checking the return value for null and sometimes not. No need for checks anywhere.

Also added two irrelevant pre-asserts