Fix argument checking.

R: @jhump 
CC: @square/jna-gmp-contributors