Ideally I would like the test case to throw an error if any was returned (instead of the desired type). But I couldn't figure out how to implement that (as any generally doesn't throw errors).