Initialize a repository with a null adapter for better error handling

Closes #19