     
 }
 
-public extension Results {
+public extension Results where Element: Object {
     
     /**
      Filter results from Realm query using MKCoordinateRegion

        
    }
    
    func sortByDistance(center: CLLocationCoordinate2D, ascending: Bool, latitudeKey: String = "lat", longitudeKey: String = "lng") -> [T] {
        
        return self
            .addDistance(center: center, latitudeKey: latitudeKey, longitudeKey: longitudeKey)

}

// MARK: - Private core extensions
private extension Results where Element: Object {
    
    /**
     Add distance to sort results
