Can we move this check into the constructor so it fails? Then you can probably just raise some exception.