I think it's probably safe to just do:

`data = data || [];`

Which will allow the code path below to work, and not cause any errors.  I need @k88hudson or @daleee to confirm this is OK (i.e., to return an empty set of results and skip processing), though.