Check argument is an integer before parsing it as one.