Fixed a bug where None would raise a confusing error