[BZ-996018] remove unnecessary cast
(cherry picked from commit 5744ff8fc246f320c4185c1101e291a7d73fe4c3)