I don't think there's anyway to check if an input is connected, however, you can force and input to be wired (with terminals shown, right click on the input and select Make this terminal >> Required). Otherwise, your method would seem to work. If the input is a float try using NaN or Inf as the default - that's a pretty unlikely input(???).
How does the DLL behave differently if nothing is connected? Would a boolean do?
Tim