option to skip distance calculation if missing values