Checks that data[requests] is set before calling it. Returns empty array if not set. Adds test.