making casting more flexible, isStruct also returns true for Maps and Nodes and isString for all simple values (boolean,number,date ...) and changed order of testing, then isString and isStruct returning true for a node