added spatialtype check to attribute test