Check existence of node before accessing properties