Casting to string when possible