Ref #125: Check if node is nil

Fix #125