fix for #77 Catch TypeError in addition to ValueError in the case of an invalid string.

Different implementations seem to throw the other one. This is reproducably failing on Travis, but not locally.
Merge pull request #78 from ros-infrastructure/datetime_fix

fix for #77 Catch TypeError in addition to ValueError in the case of an invalid string.