Fixed bug where null values would cause an error.
Merge pull request #2 from plyfe/master

Bug fixes