Fix empty string being passed to $.id