extract and assert the existence of an opt parameter