Included case sent to list on 2011-06-27 by Phillip in intersection/union/difference testcases. Added if_typed and if_typed_tt helper functions