you should check whether node exists rather than catch exception