This check was working for network_cli (returns value as int) but failing for httpapi (returns value as str). Casting to int fixes the problem.