Adding ability to track element as either string or object