check that coefficients is not None