You can use functions like ISNULL() to check NULL values. But in your case you have three conditions and I'd do something like this...
IF(Current_year_sales > 0 AND Previous_year_sales > 0,
(Current_year_sales - Previous_year_sales) / Previous_year_sales,
Whatever you wanted to show when the condition is false)
Ideally you should tag the NULLS in the script so that you can handle them easily.