convenience method with which to check if a collection is null or empty