Add referential transparency checks for expressions