force id into int only if id can be converted