Possible to have 2 let variables in 1 if condition?

I am converting Java code to Swift. This is the Java code

try {
                        if (filter == null || Float.parseFloat(ew.getMagnitude()) >= Float.parseFloat(filter))
                            liist.add(ew);
                    } catch (NumberFormatException e) {
                        
                    }

In Swift, currently this is what I have

do {
                    if let toFilter = filter, Float(ew.magnitude ?? "0") >= Float(toFilter ?? "0") {
                          list.append(ew)
                      }
                    }
                    else {
                      list.append(ew)
                    }
                  } catch {
                    
                  }

Currently

  1. it even gives out an error that I have to add a ! after the Float() because "Force-unwrap using '!' to abort execution if the optional value contains 'nil'"
  2. But i do not want that, that is why I placed th do/catch there

Please enlighten. Thank you

Possible to have 2 let variables in 1 if condition?
 
 
Q