How to check if ASP:TextBox control has value

How to check if ASP:TextBox control has value

Hi,
i want check some TextBox control if they have value do some addition else do assignment, i used the jquery script below it didn't work for me

  1.  if ($('#<%=TextBox797.ClientID%>').val() != "" && $('#<%=TextBox797.ClientID%>').val() >= 0) {
                      document.getElementById('<%=TextBox797.ClientID%>').value = parseInt(document.getElementById('<%=TextBox797.ClientID%>').value) + parseInt(document.getElementById('<%=TextBox651.ClientID%>').value);
                  } else {
                      document.getElementById('<%=TextBox797.ClientID%>').value = parseInt(document.getElementById('<%=TextBox651.ClientID%>').value);
                  }
Please kindly show me me what am doing wrong
thank you