[javascript] jQuery check if <input> exists and has a value