Factored out function that checks completeness