Improve handling of invalid national identification number