checking for null values
fix bug one param to diff is null