Here's a possible implementation for predicate methods and raising an error: https://github.com/bkeepers/dotenv/compare/config...config-predicate

It certainly gets a lot messier.