Add check to ensure second argument is an integer