is a static cast better in such cases?