range check latitude and longitude, and test for exceptions