better type guard on readAttributes