update var/is_ip: move variables, add check input