No nedd for the if, since you already ensure they are different from NULL in the line above.