kernel32/profile: Add a few NULL checks (Coverity).