Getfield with Measurements -> access to undefined reference

Have found a solution: I need to inquire only the type of a field, and the call

vtype = fieldtype(typeof(obj), :L)

gives no error.