Handle TypeError in to_python

If the string is a unicode with null bytes, then it throws a TypeError
when we try to do a strptime on it. This handles that scenario.

Fixes #158