Allow custom return types in check_if_function (#23)