move empty array check on the Connect object