check if collection exists before trying to render