Remove type hint and add assertion