@wasade already commented that you shouldn't be testing this. It's the caller the one that has to make sure that it has the correct type.