functions for validating collection IDs and collection directories