Nit: I'm a fan of doing the following (it's faster), but not required.

```
if (!data || !data['calendar-data'])
```