Collection as resources fix

When doing a query and getting back a collection, retrieving the resources from that collection was throwing an error.  This change checks to see if the attribute being converted into resources is 'data' and shortcuts the type lookup as resources don't generally have a 'data' field.