implementing const checker for expression