Handle empty node in XPATH for xml filter

Can we apply if condition, i want to execute XPATH if the node/tag is available and supply a text "null" if it is not available