[libclang] Add some checks to make sure the given CXTranslationUnit is not null, before using it.