validate options object passed to middleware