Further changes to key checking

If a key used to exist but was removed, the $result returned is nil.
This commit checks to see if $result is a hash before checking if it has
a key of $remote_node.