Improve checking for user entering integer as id
bug was that a passed int on command line is always a string to option
parser, so checking for it being an int will never be true. Solution
is to try and cast as an int and then catch the error