Fix assert condition for checking return type.