String casting for better error detection