remove some unecessary null pointer checks
Merge pull request #2167 from birarda/null-checks

remove some unnecessary null pointer checks