added isConstant and getLiteralType functions