Improve handling of None type. Fixes #157