- remove redundant NULL checks on old code where it would crash if the result was NULL later on. - add some missing NULL checks.
- remove redundant NULL checks on old code where it would crash if the result was NULL later on. - add some missing NULL checks.