use collection-check for validation, add optional empty* method, and fix empty keyseq issue