fix cases were attr exists but is None