tap.connect("xyz") would connect to the xyz tap even if it doesn't exist or is invalid.
example:
run this in your code:
try:
tap.connect("nonexistent_tap_12345")
print(f"Connected to nonexistent tap (unexpected)")
tap.disconnect()
except Exception:
print(f"Properly rejected nonexistent tap")
it will connect to the non existent tap.