Changed default of null to throw an exception.