Remove redundant ptr check in decodeScalar.