tests: fix ridiculous typo
engine: allow NULL handle

We use a NULL handle in case we don't care about the return value.  In that
case, we certainly don't care about the return type either, so use NULL for
expected_type in this case.