there are cases where a node name might be an integer

obviously even then they should be strings .. but due to array behavior in php they might still end up as integers when stored inside array structures. alternatively we would need to ensure that all phpcr implementations ensure this never happens .. but it seems to me like its easier to just deal with it here.