Might be better to return an ScValue holding NULL, but if you take care to check when resolveName returns for nullptr, then null pointer should work.