you could just write a separate routine that takes a DocVariable and a value and have that routine do any variable testing for you. then you only have to write one test instead of many if statements.