remove some unecessary null pointer checks
added rectangular range limits
Merge pull request #2167 from birarda/null-checks

remove some unnecessary null pointer checks
Merge pull request #2168 from PhilipRosedale/master

added rectangular range limits