* Remove input_datetime from mypy ignore list * Use assert * Use cast * Use common logic for initial parsing