Added an extension to BaseAttribute that will instantiate an object based on its type and ID