Don't assume an empty collection with return a contents array
Increase cyclomatic complexity to 16
Merge pull request #350 from Connexions/fix-loading-empty-collections

Don't assume an empty collection with return a contents array