Add explicit error checking along with AM/PM flag.
Add explicit error checking along with AM/PM flag.

Signed-off-by: Paul G <96dd8d96902e9c5af3b96b1eaa9c80cbc615d290@example.com>

pganssle/dateutil-test-codecov,abalkin/dateutil,jenshnielsen/dateutil,pganssle/dateutil-test-codecov,mjschultz/dateutil,sprymix/python-dateutil,abalkin/dateutil,Bachmann1234/dateutil,sprymix/dateutil