fixed check for null product