Errors with isEmpty and toLong

Errors with isEmpty and toLong

I have some old code that just stopped working and nothing I am trying to do to fix it is helping.

first of all, I am getting an error of

for code that reads:

if(response.isEmpty() || response1.isEmpty())
{
alert "The Registration Number you entered wasn't found for that item – please check your registration number and try again or contact support.";
cancel submit;
}

When i try to save the script I get an error message of:

Improper Statement
Error might be due to missing ';' at the end of the line or incomplete expression 

The line identified for the error is the code: if(response.isEmpty() || response1.isEmpty())

I have also tried 
if(response.isEmpty() != false) 
and 
if(response.isEmpty() == false) 


with the same results.

This is stopping me from fixing a line that reads:

proupdate = zoho.crm.updateRecord("Products",proid.toLong(),{"Contact_Name":newcid.toLong()},{"Support_Start_Date":timestamp.toLong()});

when i submit my form, the program reaches this line and gives me the following error for the line:

 Error in executing On Add - On Validate script
 Value is empty and 'toLong' function cannot be applied Line:(86)


This used to work fine - was there a syntax change or something?

Thanks!
Kevin