Adding check for database connection before trying to use it on get_node_type
Fixing include (forgot the quotes)