Added check for null location in sendLocation

This way, developers don't have to check for null everywhere