Solution encapsulated in _generateAttrToProjector

Also handles data.length === 0 case for the solution
(behavior is essentially undefined here anyways, so this gives more information on this casing)