Improved cast exception message for GetScalar