Apparently isfield does not work for objects.
works both for objects and structs