<address>.code.length can be used in Solidity >= 0.8.0 to access an accounts code size and check if it is a contract without inline assembly.
VoterID#isContract
Suggestion:
