Prevent returning null json arrays