How do we catch exception if node_db = None, or it can not happen? If so, why? Please comment in code (and in every place where I ask for comment, we need comments in code).