protect against None value for location (fix #8)