make randomObject work with empty arrays