Added assert for nil parameters.