[] call_and_check function updated to handle result type in the correct way