$node->language is used first before tnid, as tnid can still be zero even if the language is set, if the translation is not available.
	Also, isset() is called now to handle a potential exception while creating a new node.