<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def location_check(lat, lon):
 """For use by Core client wrappers"""

        if not (isinstance(lat, number_types) and -90 <= lat <= 90):
            raise ValueError("Latitude: '{latitude}' invalid".format(latitude=lat))

        if not (isinstance(lon, number_types) and -180 <= lon <= 180):
            raise ValueError("Longitude: '{longitude}' invalid".format(longitude=lon))