Check for nil when node_api tries to call destroy.
Fixed cleanup of dependencies for interface_ports and translations.