Finished valid_datetime method