Check for midi func before connecting