fixing type checking for constants.  We still have an issue with cyclic constants...