John Swinney has defending meeting Ming Yang to lobby for investment in Scotland, despite national security concerns.