Type casting + tests