Options validation

Was part of #3. Validate options in `with-options`.