Json api nil entities

- Don't error out if entities is passed nil
- Don't display entities that are empty
- Don't display entity that is nil