better way to detect data/meta object