[lib] remove unused import in deployment, check that ip_mac is not empty