First Minister John Swinney has said he would not refuse to meet Donald Trump if he visits Scotland, after the Scottish Greens urged ministers not to do so.