Updated fmConnection test_if_valid function.