Type checking for constants and testing