add nulls to return and if when they have a missing last param, as the optimizer expects